• 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?


java interview questions for experienced candidates





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 will help you in learning.Please leave your comments and suggestions in comment section. if you any doubts please use search box provided right side. Search there for answers thank you.
«
Next
Newer Post
»
Previous
Older Post

No comments

Leave a Reply

Select Menu