JAVA

Some question of Java programs are given below as a link. Click on that link which one you want to know moreThe given links will display the program code and its output. Here I displayed the output as an Image. Check its working by copying that codes to a Notpad or any text editors and then save as a JAVA file.

Questions are given below. Click on that to get answers,
  1. Write a java program to find area and circumference of a circle?
  2. Write a java program to calculate electricity bill by reading the consumer no and no of units consumed. The charges for different slabs are given below
    up to 50 unitsRs 1.5 per unit
    50-100 unitsRs 2 per unit
    100-200 unitsRs 2.8 per unit
    200-300 unitsRs 3.5 per unit
    above 300 unitsRs 4.50 per unit
  3. Write a java program to  display n prime numbers?
  4. Write a java program to display Fibonacci series up to n?
  5. Write a java program to check whether a given year is leap or not?
  6. Write a java program to display the Armstrong within range?
  7. Write a java program to check whether a given number is perfect, abundant, or deficient?
  8. Write a java program to check whether the given sides can form a triangle. If yes,find area of the triangle?
  9. Write a java program to find the roots of a quadratic equation?
  10. Write a java program to compute the mean and SD of 3 numbers. Mean=(a+b+c)/3, SD=√((a-m)²+(b-m)²+(c-m)²)/3
  11. Write a java program to read an array of 10 numbers and to find the following,
    a. Sum of the elements
    b. Average of the elements
    c. Maximum of the elements
    d. Minimum of the elements 
     
  12. Write a java program to sort an array?
  13. Write a java program to count the number of even numbers, odd numbers, positive numbers, negative numbers and zeros in an array?
  14. Write a java program to appending two arrays?
  15. Write a java program to find the sum of the digits and reverse of a given number using class and objects?
  16. Write a java program to find the volume of cube, rectangular box, cylinder using function overloading?
  17. Write a java program to create a class complex. Create two objects find the sum of the complex numbers, Read the real and imaginary part using constructor?
  18. Find the area of a square and a rectangle using overloaded constructor?
  19. Write a java program to enable arithmetic exceptions?
  20. Write a java program for generating two threads. One for odd numbers and one for even numbers?

No comments:

Post a Comment