0% found this document useful (0 votes)
4 views1 page

Java Programs

The document outlines a series of Java practice programs for students at the Chennai Institute of Technology. It includes tasks such as calculating student marks, demonstrating type casting, generating Fibonacci numbers, and checking properties of triangles. Additional exercises involve string manipulation, the use of static methods, final variables, and constructors.

Uploaded by

melvin24sahai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Java Programs

The document outlines a series of Java practice programs for students at the Chennai Institute of Technology. It includes tasks such as calculating student marks, demonstrating type casting, generating Fibonacci numbers, and checking properties of triangles. Additional exercises involve string manipulation, the use of static methods, final variables, and constructors.

Uploaded by

melvin24sahai
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CHENNAI INSTITUTE OF TECHNOLOGY

(Autonomous)
Sarathy Nagar, Puduper, Chennai – 600 069.

JAVA PRACTICE PROGRAMS


1. Write a program that takes 10 student marks in an array and prints the highest, lowest, and
average.
2. Write a program to demonstrate widening type casting.
3. Write a program to generate the first 15 Fibonacci numbers.
4. Write a program to check whether a triangle is isosceles, equilateral, or scalene.
5. Write a program that breaks a loop when the sum exceeds 100.
6. Write a program to reverse a number.
7. Write a program to check whether a string is a palindrome.
8. Write a program to count vowels and consonants in a string.

9. Write a program to demonstrate the use of static method and static variable.
10. Write a program to illustrate final variable and show that it cannot be changed.
11. Write a program to show the use of this keyword to differentiate between instance variable
and parameter.
12. Write a program to demonstrate super keyword to call the parent class method.
13. Write a program where a subclass constructor calls the super() constructor.
14. Write a program using a do-while loop to keep taking input until the user enters 0.
15. Write a program that converts a double value into int and float.

You might also like