First Mock Intervie Questions
First Mock Intervie Questions
--------------------------------
1. What is language?
2. What are the flavors/versions of java?
3. What are the features of Java?
4. What is Java?
5. What are the advantages of java?
6. What is source code?
7. What is byte code?
-> What is a .class file?
8. What is platform?
9. What do you mean by Platform independent programming language?
-> Is java platform independent language?
-> Is JVM platform independent or dependent?
10. What makes java platform independent programming language?
11. What is compiler , JVM, JDK and JIT?
-> What is the work of interpreter?
12. What is the meaning of WORA?
13. What is main method?
14. Why main method is static?
15. Can we change the return type of main method?
16. Can we change/remove the parameter from main method?
17. Can we change the public and static place to reverse in main method?
18. What part we can change in main method ?
19. Can we execute a class without main method?
20. Can we develop a empty class?
21. Can we execute a empty class?
22. Why main method is public , static , void and why the name is main and why the
parameter is String[] ?
23. What do you mean by command line argument?
24. What is token and how many types of tokens are there?
25. What is keyword and how many keywords are there in java?
26. What is identifier?
27. What are the rules to follow while creating an identifier?
28. What is Literals and how many literals are there?
29. What are the punctuators?
30. What is operator and how many operators are there?
-> What is the work of bitwise operator?
-> What is the work of ternary operator?
-> What is the work of shift operator?
-> What is the work of Logical operator?
-----------------------------
-----------------------------
-----------------------------
-----------------------------
Que 5 : Write a java program to print all armstrong numbers between given range.
(in this question iterviewer wants to check logic for multidigit armstrong
number like 4,5..n digit.)
given range : 100 to 10000
Output :
153
370
371
407
1634
8208
9474
-----------------------------
Que 6 : Write a java program to check given number is perfect number or not.
Explanation : sum of divisors is equal to given number then its known as
perfect number. for example 6 is perfect number because(1+2+3 = 6)
Given number : 6
Output : true
Given number : 28
Output : true
Given number : 7
Output : false
-----------------------------
Que 7 : Write a java program to check given number number is prime or not.
Given input : 7
Output : true
Given input : 4
Output : false
-----------------------------
*
* *
* * *
* * * *
* * * * *
-----------------------------
*
* *
* *
* *
* * * * *
-----------------------------
*
* *
* * *
* * * *
* * * * *
-----------------------------
*
* *
* *
* *
* * * * *
-----------------------------
*
* *
* * *
* * * *
* * * * *
-----------------------------
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *