Questions
- What is a class?
- What is object
- What is the difference between instance variable and a local variable?
- What is Constructor? Types of Constructor?
- Difference between Break and Continue?
- To exit the system from the current execution what command is used in java?
- Difference between for and foreach loops in java and use of it?
- Can we have multiple public class within a class?
- What is inheritance? Types of inheritance? Does multiple inheritances allow in java? If not, why?
- What is polymorphism? How we can achieve it?
- Difference between method overloading and method overriding?
- Can we achieve method overloading when two methods have an only difference in return type?
- Method overloading and overriding examples in the Selenium project?
- What is encapsulation?
- What is final and super keyword? Difference between them?
- Explain runtime polymorphism and compile-time with examples?
- Can the final/Static method be overloaded?
- Can final/Static methods be overridden?
- Can we execute a class without a main method?
- What is Package?
- What is an Abstract Class? Write an example code?
- What is an Interface? What is the difference from the Abstract class?
- Can we use private and protect access modified inside an Interface?
- Can multiple inheritances support in Interface?
- Examples of Abstract and Interface used in the selenium project?
- What is Exception and what is the base class of it?
- What is done in finally block?
- What is the difference between Throws and Throw?
- Collection type in java?
- Difference between Array and ArrayList?
- Difference between Set and HashSet?
- Difference between HashMap and HasSet?
- Difference between ArrayList and LinkList?
- How do you use Map collection your project?
- Can we have a duplicate key value in HasMap?
- How to fetch values from a hashmap?
Java Programs
1. Write a Code to generate Random numbers.
2. Write code to verify a number is a perfect number or not.
3. Fibonacci series from 1 to 10.
4. Write a program to find a Factorial of a number.
5. Swap two number s without using the third variable.
6. Program to find the greatest of three numbers.
7. An Array of numbers given. .Find the largest two number and print it
8. Reverse a number.
9. Verify if a given number is a palindrome or not.(same concept of reversing a number)
10. Armstrong number program.
11. A String is given to remove the white spaces, reverse it and print the only odd position characters.
12. Check if a string is an anagram of another string.
13. A string is given make few characters to upper case as asked.
14. In a String print the occurrence of each character.
15. In a Statement check how any duplicate strings are there and remove them.
16. Use split to print each word of a statement.
17. Find the substring of a String.
18. Remove duplicate characters from a string