• We have provided some java interview programming questions for freshers and experienced candidates.
  • So please try to answer these java interview questions and practice.
  • If you have any doubt go through the given explanation link you can get the answer for that.
  • Still if  you need any clarifications feel free to contact us. Skype/Gmail: instanceofjava




Program #1: what will happen if we try to interchange modifiers of main method

  1. package interviewprograms.instanceofjava;
  2. public class InterviewProgram {
  3.  
  4. /**
  5. * @java interview programming  questions and answers for freshers and experienced
  6.  */
  7.   
  8. static public void main(String[] args) {
  9.         
  10.         System.out.println("Hello world");
  11.  
  12.     }
  13. }





Program #2:Do you know about static in java . How static works?


static+interview+question





Program #3:Java Interview question on try catch block in java

  1. package interviewprograms.instanceofjava;
  2. public class InterviewProgram {
  3.  
  4. /**
  5. * @java interview programming  questions and answers for freshers and experienced
  6.  */
  7.   
  8. public static void main(String[] args) {
  9.         
  10.  try {
  11.  
  12.             System.out.println("I am try block");
  13.             
  14. } finally {
  15.  
  16.             System.out.println("I am finally block");        }
  17.  
  18. }
  19. }







Program #4:Java Interview question on what happens when we print object
  1. package interviewprograms.instanceofjava;
  2. public class InterviewProgram {
  3.  
  4. /**
  5. * @java interview programming  questions and answers for freshers and experienced
  6.  */
  7.   
  8. public static void main(String[] args) {
  9.         
  10.  try {
  11.  
  12.             System.out.println("I am try block");
  13.             
  14. } finally {
  15.  
  16.             System.out.println("I am finally block");        }
  17.  
  18. }
  19. }





Instance Of Java

We are here to help you learn! Feel free to leave your comments and suggestions in the comment section. If you have any doubts, use the search box on the right to find answers. Thank you! 😊
«
Next
Core java online programming test on inheritance
»
Previous
Java programming interview questions and answers for experienced

No comments

Leave a Reply

Select Menu