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

JAVA-Assignment-Final

The document is an assignment for a Java course that includes descriptive questions covering key concepts such as platform independence, the Java Virtual Machine, and object-oriented programming principles. It also contains programming tasks that require writing Java programs for various algorithms and data handling, such as checking for Armstrong numbers, generating Fibonacci series, and sorting names. The assignment aims to assess both theoretical knowledge and practical programming skills in Java.

Uploaded by

prootpmanager
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)
2 views1 page

JAVA-Assignment-Final

The document is an assignment for a Java course that includes descriptive questions covering key concepts such as platform independence, the Java Virtual Machine, and object-oriented programming principles. It also contains programming tasks that require writing Java programs for various algorithms and data handling, such as checking for Armstrong numbers, generating Fibonacci series, and sorting names. The assignment aims to assess both theoretical knowledge and practical programming skills in Java.

Uploaded by

prootpmanager
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
You are on page 1/ 1

JAVA Assignment-1

Descriptive Questions:

1. Why is Java platform-independent?


2. What is java virtual machine?
3. Define following terms: Class, object, encapsulation, inheritance, polymorphism.
4. What are eight basic types in java?
5. What are two steps to create an array?
6. What are three types of java comments?
7. What is significance of main method in java?
8. What is the scope of variable?
9. What is a constructor?
10. What is method overloading?
11. Contrasts method overloading and method overriding.
12. What are the various access specifiers for Java classes?
13. What are Loops in Java? What are three types of loops?
14. What's the purpose of Static methods and static variables?

Programs:
1. Write a java program to find input value is Armstrong number or not.
2. Write a java program to find input value is Palindrome number or not.
3. Write a java program to generate a Fibonacci series.
4. Write a java program to find number is prime or not.
5. Find out biggest between 3 integer using ternary operator, 3 numbers should come from
command line.
6. Write a java program to input some kind of information of a person from the keyboard.
Age of a person
Height of a person
Weight of a person and display it in the following manner. e.g.
So, you're 35 years old, 6'2" tall and 60KG heavy.
7. A 4-digit number is entered through keyboard. Write a program to print a new number with
digits reversed as of original one. E.g.-
INPUT: 1234 OUTPUT: 4321
INPUT: 5982 OUTPUT: 2895
8. Write down the names of 10 of your friends in an array and then sort those in alphabetically
ascending order.
9. Write a following pattern:
1
12
123
10. Create a person inherit two classes from it politician & sportsman provide constructors &
calculate salary and display functions.

You might also like