The Artima Developer Community
Sponsored Link

Java Buzz Forum
java programming interview questions and answers for experienced

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 programming interview questions and answers for experienced Posted: Jul 16, 2016 9:03 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by instanceof java.
Original Post: java programming interview questions and answers for experienced
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
  • Here some of the java programming interview questions and answers for experienced on different topics.
  • Java interview programs and answers for experienced.
  • Java Coding interview Questions
  • Java tricky interview programs to practice.




 Program #1: what will happen if we try to print null using system.out.println

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


Click for Output


Program #2: Java Interview program :Can we create object for abstract class in same class

  1. package interviewprograms.instanceofjava;
  2. public abstract class AbstractDemo {
  3.  
  4. public static void main(String args[]){
  5.         
  6.         AbstractDemo obj = new AbstractDemo();
  7.         
  8.  }
  9.  
  10. }


Click for Output


Program #3: Java Interview program : what will be the output of below java program




Click for Output


 Program #4: Guess the order of execution of constructors

  1. package interviewprograms.instanceofjava;
  2. public class ConstructorDemo {
  3.  
  4. ConstructorDemo(){
  5.         this(1);
  6.         System.out.println("Zero argument constructor");
  7. }
  8.     
  9. ConstructorDemo(int a){
  10.         this("Hi",1);
  11.         System.out.println("One argument constructor");
  12. }
  13.  
  14. ConstructorDemo(String str, int x){
  15.     
  16.         System.out.println("Two argument constructor");
  17. }
  18.  
  19. public static void main(String[] args) {
  20.  
  21.         ConstructorDemo obj =new ConstructorDemo();
  22.  
  23.     }
  24.  
  25. }


Click for Output


Read: java programming interview questions and answers for experienced

Topic: From Pig to Spark: An Easy Journey to Spark for Apache Pig Developers Previous Topic   Next Topic Topic: $29.99 for the IT Security & Ethical Hacking Certification Training ($1,895 value) - Deal Alert

Sponsored Links



Google
  Web Artima.com   

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