JAVA PROGRAMS

 Program links ::--

Q1) Write a java program which define class Employee with data member as name and salary. program store theinformation of 5 Employees. display the name who earn maximum salary.(Use array of object).

Q2) Define a Student class (roll number, name, percentage). Define a default and parameterized constructor.Keep a count of objects created. Create objects using parameterized constructor and display the object countafter each object is created. (Use static member and method). Also display the contents of each object.

Q3) Write a java program which accepts a string and a characters to be search from the user the program should display the total no of character in string.

Q4) Write a java program that take input as a person name in the format of first middle last name and then print it in the form last first and middle, where in the middle name first character is capital letter.

Q5) Define class student(rno,name,marks1,marks2) .Define result class(total ,percentage) inside the student class. accept the student details and display the Marksheet with Rno,name,marks1,Marks2,toatl,percentage.(use inner class concept.)

Q6) Create an abstract class Shape with methods calc_area and calc_volume. Derive threeclasses Sphere(radius) , Cone(radius, height) and Cylinder(radius, height), Box(length, breadth,height)from it. Calculate area and volume of all. (Use Method overriding).

Q7)Write a java program to find maximum element of an Array.

Q8)Write a java program to accept 'n' elements from user and store them in ArrayList collection and Display it in reverse order.

Q9)Write a java program to accept a number from user and find its sum of digits.

Q10)Write a java Program to get 20 input Characters through loop.

Q11)How to print a character of string in New Line without using looping statement in Java?

Q12)Define a class person(pid,pname,gender,age).and also create n objects of person class using parametrized constructor and displaying by using toString() method.

Q13)How to insert a value to Nth index of array in Java?

Q14)Write a Java Program to find Whether it is Armstrong Number or not?

Q15)How to find out nth value by using array in Java?

Q16) Java program to accept array & Print in Matrix format.

Comments

Post a Comment