Aatul Palandurkar

Posts Tagged ‘Java

Objectives:

  • Write a Java program to to generate random numbers and print the same
  • Write a program to generate random numbers
  • Write a program to generate random numbers in Java

Java Program:


import java.util.Scanner;
import java.util.Random;

class GenerateRandomNumber
{
public static void main(String[] args)
{
int maxRange;

//create objects
Scanner SC = new Scanner(System.in);
Random rand = new Random();

System.out.print("Please enter maximum range: ");
maxRange=SC.nextInt();

for(int i=1; i<=10; i++)
{
System.out.println(rand.nextInt(maxRange));
}
}
}

Output:

Please enter maximum range: 500
467
61
100
449
68
316
445
224
54
498

Objectives:

  • Write a Java program to find duplicate characters in the string and print the duplicate characters
  • Write a program to find duplicate characters in String

Java Program:

public class DuplicateCharacters {
    public static void main(String args[]) {

        String str = "NITIN";
        int count = 0;

        char input[] = str.toCharArray();
        System.out.println("Duplicate Characters are:");

        for (int i = 0; i &amp;lt; str.length(); i++) {
            for (int j = i + 1; j &amp;lt; str.length(); j++) {
                if (input[i] == input [j]) {
                    System.out.println(input[j]);
                    count++;
                    break;
                }
           }
        }
    }
}

Output:

Duplicate Characters are: N I

  • In: Java
  • Comments Off on Moved by Java

PC: @mimaraslan

Happy Birthday Java | PC: @mimaraslan

As #Java is turning 25 years tomorrow, here is my story with Java. I Love Java, I am #MovedByJava

2004 – Learned Java
2005 – Taught Java to some of my college friends and juniors
2006 – Started Institute to teach Java and related technologies
2007 – Joined a company as Java Developer, developed various projects
2008 – Joined Java User Group Nagpur (India) – known as #JUGNAGPUR2004 – Learned Java
2005 – Taught Java to some of my college friends and juniors
2006 – Started Institute to teach Java and related technologies
2007 – Joined a company as Java Developer, developed various projects
2008 – Joined Java User Group Nagpur (India) – known as #JUGNAGPUR
2009 – Developed numerous project on Java
2010 – Started side hustle by taking small Java and Web projects with 5 clients
2010 – Community Contributor at #NetBeans (#NetCAT)
2010 – Started writing blogs on Java and NetBeans
2010 – NetBeans Platform Training and Certification
2011 – Received the title of “Outstanding Programmer”
2011 – Published first Java Video Tutorial on YouTube
2011 – Cracked Oracle Certifications in a month – OCJP & OCWCD
2011 – Conducted Corporate Training for India’s biggest Training Company – #CDAC
2011 – Joined an MNC as Senior Corporate Trainer for Java, conducted several induction programs and corporate batches. The biggest batch size was 1250
2011 – Community Contributor at NetBeans (NetCAT)
2011 – Delivered Seminar on Java at 5 Colleges & Universities
2012 – Completed a big project on Java for a first overseas client
2012 – attended my first #JavaOne Conference in India
2012 – Conducted Workshops and delivered Seminar on Java and #Android at 20 Colleges and Universities
2013 – Published my first book on Java and NetBeans (Step by Step guide to developing different Java applications using NetBeans IDE)
2013 – Speaker at JavaOne India, conducted a Hands-On-Lab on #JavaEE and #HTML5 using NetBeans IDE
2013 – Conducted Workshops and delivered Seminar on Java and Android at 20 Colleges and Universities
2013 – Conducted Induction Training on Java for 5 corporate companies
2013 – Started my company with few clients and developed 10+ Java Projects
2013 – Community Contributor at NetBeans (NetCAT)
2014 – Conducted Workshops and delivered Seminar on Java and Android at 30 Colleges and Universities
2014 – Conducted Induction Training on Java for 10 corporate companies
2014 – Community Contributor at NetBeans (NetCAT)
2014 – Developed 15+ Java and Android Projects
2015 – Got Selected as “NetBeans Dream Team” Member
2015 – First International Training in Gulf on Java and Android (30 days)
2015 – Awarded as “Best Entrepreneur for Corporate Training in India”
2015 – Awarded as “Individual Professional”
2015 – Developed a self-paced video course on Java and Android for a multinational company headquartered in the UK
2015 – Conducted Workshops and delivered Seminar on Java and Android at 30 Colleges and Universities
2015 – Conducted Induction Training on Java, JavaEE, #Hibernate, and #Struts for 10+ corporate companies
2015 – Developed 10+ Java and Android Projects
2016 – Conducted Workshops and delivered Seminar on Java and Android at 40 Colleges and Universities
2016 – Conducted Induction Training on Java, JavaEE, #Hibernate, #Struts, and #Spring for 15+ corporate companies
2016 – Community Contributor at NetBeans (NetCAT)
2016 – Developed 10+ Java, Android, and Web Projects
2017 – Conducted Workshops and delivered Seminar on Java and Android at 30+ Colleges and Universities
2017 – Conducted Induction Training on Java, JavaEE, #Hibernate, #Struts, and #Spring for 5+ corporate companies
2017 – Developed 15+ Java, Android, and Web Projects
2018 – Conducted Workshops and delivered Seminar on Java and Android at 20 Colleges and Universities
2018 – Conducted Induction Training on Java, JavaEE, #Hibernate, #Struts, and #Spring for 10+ corporate companies
2018 – Developed 5+ Java, Android, and Web Projects
2018 – Lead for Java User Group, Pune
2019 – Conducted Workshops and delivered Seminar on Java and Android at 30 Colleges and Universities
2019 – Conducted Induction Training on Java, JavaEE, #Hibernate, #Struts, and #Spring for 10+ corporate companies
2019 – Conducted Java Induction Training in Gulf
2019 – Developed 10+ Java, Android, and Web Projects
2019 – Lead for Java User Group Nagpur
2020 – Conducted Workshops and delivered Seminar on Java and Android at 5+ Colleges and Universities
2020 – Developed 2 Java and Android Projects
2020 – Conducting Online Training on Java
2020 – Writing another Book on Java
2020 – Recording video courses on Java

PC: @mimaraslan

Love you Java and Wish you a very happy birthday

Thank you, Java

Aatul Palandurkar

My Experience with uCertify :

I had an access to uCertify 1Z0-808 – Oracle Certified Associate Java SE 8 Programmer course, and I think it’s a pretty good supplement study guide for the course. The questions and flash cards make good revision and I am especially fond of the exam mode and exam readiness assessment that really helps to determine the how well one grasps the information and concepts. For a technical course of this nature, some labs would help to drive home the real-world application of the skills learn

ucertify

About Exam:

Oracle Java SE 8 Programmer I exam is designed to certify the competency of Java professionals in developing Java applications, mastering  Java data types, operators and decision control structures, and understanding OOPs concepts of Java. Java SE 8 significantly changes the way Java Programmers write code. Earning a Java SE 8 Certification gives you the tools to make the most of the new features within Java SE 8.

The Java SE 8 Oracle Certified Associate (OCA) certification helps you build a basic understanding of Java, while expanding your knowledge of general programming.

The ideal candidate who would earn this certification typically has a technical background and wants to improve programming skills, or may be new to object-oriented programming and Java.

 

About uCertify:

uCertify is a leading provider of online Test preps, Courses & Labs for IT and Project Management certification exams.Our courses are authored by the industry experts (with 15+ years of experience)  and we have a fan base of  600,000 happy customers in 200 countries worldwide.

 

Objectives :

  • Decimal to Binary Conversion
  • Converting Decimal to Binary
  • Converting Decimal Number to Binary format
  • Write a program to convert decimal to binary
  • Write a program to convert decimal number to binary format
  • Write a program to convert positive decimal number to binary format
  • Write a program to convert decimal to binary using Scanner class
  • Write a program to convert decimal to binary, take input using Scanner class

 

Java Program to convert Decimal to Binary : 

public class DecimalToBinary {
 
 public void toBinary(int number){
 int binary[] = new int[25];
 int n = 0;
 // Convert Decimal to Binary
 while(number > 0){
 binary[n++] = number%2;
 number = number/2;
 }
 // Print Binary number
 for(int i = n-1;i >= 0;i--){
 System.out.print(binary[i]);
 }
 }
 
 public static void main(String[] args){
 DecimalToBinary obj = new DecimalToBinary();
 obj.toBinary(14);
 }
}

Output :

1110

 

Java Program to convert Decimal to Binary using Scanner class :


import java.util.Scanner;

public class DecimalToBinary {

public void toBinary(int number){
int binary[] = new int[14];
int n = 0;

// Convert Decimal to Binary
while(number > 0){
binary[n++] = number%2;
number = number/2;
}

// Print Binary Number
for(int i = n-1;i >= 0;i--){
System.out.print(binary[i]);
}
}

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter a number: ");
int num= scanner.nextInt();
DecimalToBinary obj = new DecimalToBinary();
obj.toBinary(num);

}
}

Output :

Enter a number: 14

1110


Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 13,214 other followers

Tweets

YouTube

Archives

%d bloggers like this: