Вы находитесь на странице: 1из 3

Basic

1. Write a simple program to print your name, dob, age, address, phone no. in the
console.

Datatypes and Variables

1. Write a program for integer datatype in octal and hexa decimal format and print
the output in console.
2. Write a program to find the ascii code of the characters?
3. Write a program for character datatype which accepts different escape characters
as an input.

Operators

1. Write a program to perform all arithmatic operations.


2. Find the sum and Average of the 5 numbers.
3. The Radius is 16.8 Find the area and perimeter of the circle.
4. Find the greatest between two numbers.
5. To check whether the numbers equal or not.
6. Program to show swap of two no�s without using third variable.
7. Program to shift given data by three bits to the left.
8. Program to use bitwise AND operator between the two integers.

Control Statements

Conditional Statements.

1.Program to find that entered year is leap year or not.


2.Find the biggest amongst three numbers.
3.Find the students grade using elseif ladder.
4.To check whether the given character is vowels or not using swich case.
5. Find the month of the year using switch case.
6.Program to find whether given no is even or odd.
7.Program to display arithmetic operator using switch case.

Iteration Statements.

1.To find whether the given number palindrome or not.


2.Generate the armstrong numbers between 0 and 1000.
3.Factorial of given number.
4.Print the fibonacci series to given number.
5.Find the sum of digits of given number.
6.Program to Print the Numbers, Which are Divisible by 3 and 5 from
First 100 Natural Numbers .
7.Program to generate table for a given number.

Jumping Statements.

1.Generate the prime numbers upto 100.


2.Write a program to generate multiples of 7 between 250 to 400.

Object and Classes

1. Write a program to access the properties of other class by creating object.


2. Write a method to find the total and average of 5 subjects.
3. Write a program to print a statement while object is created.
4. Initialize the account details of a person using constructor and calculate the
simple interest for him.
OOPS

1. Write a program to create a secure bank account using encapsulation.


2.Compute a code to show a relationship between bird and plane.
3. Write a program for one person act as a many.
4. Write a program to hide unwanted details from user using abstraction.
5. Write a program to show the relationship between vechiles using hierarchical
inheritance.

Array
1. Write a program to sort an array elements either by descending or ascending.
2. Program to show sum of 10 elements of array & show the average.
3. Program to find the maximum no in an array.
4. Program to perform matrix addition and subtraction by using multidimensional
array.

Advanced Class Features

1. Write a program to print "This Prints Before Main" which should printed before
the main method.
2. Write a method, which get the details of employee and calcuate his/her salary
for a month and make the employee id as constant.
3. Find the area of the rectangle by get the length and breadth as input from the
command line.

Packages and Interfaces

1. Create a class c1 as package p1, c2 as package p2 where p2 is subpack of p1 and


c3 as package p3 where p3 is subpack of p2. Import all these package in the class
c4.
2. Create a calculator interface, which is implemented by the calc class for
performing various calculator operations.

java.lang package

1. Write a program to get radius of the circle from the command line and calculate
the circumference of the circle.
2. Write a program to get a lower case character from the command line and convert
it into upper case without using any predefined methods.
3. Write a program to find the ceil and floor for the value 1342.234?
4. Write a program to find the time taken for iteration from 1000 to 100000?
5. Write a program to calcuate 13 power 4 without using any predefined methods.

Exception Handling

1. Write a program which handles different types of exception for a particular try
block?
2. Write a program which prints "Hello to all!" at the end, even any type of
exception occurs?
3. Create the user defined exception class which rises when user types password
wrong more than 3 times?

String Handling

1. Write a program to find the length of the String without using predefined
method?
2. Write a program to reverse a String without using predefined method?
3. Write a program to concate more than 2 String into single string?
4. Write a program to convert to String to upper case without using predefined
method?
5. Write a program to insert a word or character into a StringBuffer without using
any predefined method?

Multithreaded Programming

1. Create a thread which prints "Welcome you all!" and get terminated?
2. Write a mutithreaded program, where thread 1 prints 1 to 5 , thread 2 prints 6
to 10 and thread 3 prints 11 to 15.
3. Write a mutithreaded program, where main thread prints "bye bye!" at the end,
after all child threads finishes their work.
4. Write a mutithreaded program, where thread 2 waits until thread1 finishes its
work and thread 3 waits until thread2 finishes its work? Thread1 has to calculate
total of 5 subject, Thread2 has to find the average, Thread3 has to put the grade.

java.util package

1. Create a class for cricket player details and store the 11 players information
in a ArrayList?
2. Create a class which stores the object in descending order?
3. Create a class which stores object with (key,value) pair where pincode as a key
and area as a value in the sorted order?
4. Generate a random number for 10 students and sort them using that random number?

java.io package

1. Write a program get input from console and perform different arithmetic
operations?
2. Write a program to get the students personal details from console and store it
in a file?

java.net package

1. Write a client/server program where server perform arithemetic operations from


input given from the client and send the result to the client?
2. Write a broadcasting server program, which broadcast "Current date and Time" to
all clients?

Вам также может понравиться