The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java interview questions to practice

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
instanceof java

Posts: 576
Nickname: instanceof
Registered: Jan, 2015

instanceof java is a java related one.
Java interview questions to practice Posted: Jul 16, 2016 11:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by instanceof java.
Original Post: Java interview questions to practice
Feed Title: Instance Of Java
Feed URL: http://feeds.feedburner.com/blogspot/TXghwE
Feed Description: Instance of Java. A place where you can learn java in simple way each and every topic covered with many points and sample programs.
Latest Java Buzz Posts
Latest Java Buzz Posts by instanceof java
Latest Posts From Instance Of Java

Advertisement
  • 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. }


Click for Output


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


java interview questions for experienced candidates


Click for Output


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. }



Click for Output



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. }


Click for Output


Read: Java interview questions to practice

Topic: 23% off Sony ICD-UX533BLK Digital Voice Recorder - Deal Alert Previous Topic   Next Topic Topic: OpenStack-related business models to exceed $4bn by 2019, 451 Research

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use