4. this keyword
6. ArrayList
7. HashMap
Questions:
1. What is Java?
2. What are the main features of Java?
3. What is the difference between JDK, JRE, and JVM?
4. What is the difference between an object and a class?
5. What are the access modifiers in Java?
6. What is inheritance in Java?
7. What is the difference between method overloading and method overriding?
8. What is the ‘final’ keyword in Java?
9. What is the difference between an array and an ArrayList in Java?
10. What is the difference between String, StringBuffer, and StringBuilder in Java?
11. What is the difference between ‘==’ and ‘equals()’ in Java?
12. What are constructors in Java?
13. What is the difference between a constructor and a method?
14. What are exceptions in Java?
15. What is the difference between checked and unchecked exceptions?
16. What is the purpose of the ‘static’ keyword in Java?
17. What is polymorphism in Java?
18. What is an interface in Java?
19. What is a package in Java?
20. What is the significance of the 'this' keyword in Java?
21. Why Java is platform independent?
Assignment: Explain the program line by line
1. Write a program to reverse a string in Java.
2. Write a program to check if a number is prime or not.
3. Write a program to find the factorial of a number.
4. Write a program to check if a string is a palindrome.
5. Write a program to print Fibonacci series up to a given number.
6. Write a program to find the largest of three numbers.
7. Write a program to count the number of vowels in a string.
8. Write a program to print a pyramid pattern of stars.
9. Write a program to find the sum of digits of a number.
10. Write a program to print the prime numbers between 1 and 100.
11. Write a program to check if a number is Armstrong (Narcissistic) number.
- An Armstrong number is a number that is equal to the sum of the cubes of its digits (for a 3-digit number).
12. Write a program to remove duplicates from an array.
13. Write a program to check if a string is an anagram of another string.
14. Write a program to find the GCD (Greatest Common Divisor) of two numbers.
15. Write a program to find the LCM (Least Common Multiple) of two numbers.
Comments
Post a Comment