Core Java Real Time Interview Questions and Answers for Freshers and Experienced Top MNC Companies TCS, Wipro, Infosys, Tech Mahindra, Accenture, WellsFargo and Mindtree

By | February 14, 2017

Core Java Real Time Interview Questions and Answers for Freshers and Experienced Top MNC Companies TCS, Wipro, Infosys, Tech Mahindra, Accenture, WellsFargo and Mindtree

Core Java Real Time Interview Questions and Answers for Freshers and Experienced Top MNC Companies TCS, Wipro, Infosys, Tech Mahindra, Accenture, WellsFargo and Mindtree

  What Is The Most Important Feature Of Java?

Java is a platform independent language.

  What Do You Mean By Platform Independence?

Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).

  Are Jvm’s Platform Independent?

JVM’s are not platform independent. JVM’s are platform specific run time implementation provided by the vendor.

  What Is A Jvm?

JVM is Java Virtual Machine which is a run time environment for the compiled java class files.

  What Is The Difference Between A Jdk And A Jvm?

JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.




  What Is A Pointer And Does Java Support Pointers?

Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and reliability issues hence Java doesn’t support the usage of pointers.

  What Is The Base Class Of All Classes?

java.lang.Object

  Does Java Support Multiple Inheritance?

Java doesn’t support multiple inheritance.

  Is Java A Pure Object Oriented Language?

Java uses primitive data types and hence is not a pure object oriented language.

  Are Arrays Primitive Data Types?

In Java, Arrays are objects.




  What Is Difference Between Path And Classpath?

Path and Classpath are operating system level environment variales. Path is used define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.

  What Are Local Variables?

Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them.

  What Are Instance Variables?

Instance variables are those which are defined at the class level. Instance variables need not be initialized before using them as they are automatically initialized to their default values.

  How To Define A Constant Variable In Java?

The variable should be declared as static and final. So only one copy of the variable exists for all instances of the class and the value can’t be changed also. static final int PI = 2.14; is an example for constant.




  Should A Main Method Be Compulsorily Declared In All Java Classes?

No not required. main method should be defined only if the source class is a java application.

  What Is The Return Type Of The Main Method?

Main method doesn’t return anything hence declared void.

  Why Is The Main Method Declared Static?

main method is called by the JVM even before the instantiation of the class hence it is declared as static.

  What Is The Arguement Of Main Method?

main method accepts an array of String object as arguement.

  Can A Main Method Be Overloaded?

Yes. You can have any number of main methods with different method signature and implementation in the class.




  Can A Main Method Be Declared Final?

Yes. Any inheriting class will not be able to have it’s own default main method.

 

Next Page (20-40)

Core Java Real Time Interview Questions and Answers for Freshers and Experienced Top MNC Companies TCS, Wipro, Infosys, Tech Mahindra, Accenture, WellsFargo and Mindtree

Core Java Real Time Interview Questions and Answers for Freshers and Experienced Top MNC Companies TCS, Wipro, Infosys, Tech Mahindra, Accenture, WellsFargo and Mindtree




One thought on “Core Java Real Time Interview Questions and Answers for Freshers and Experienced Top MNC Companies TCS, Wipro, Infosys, Tech Mahindra, Accenture, WellsFargo and Mindtree

  1. Pingback: Core Java Frequently Asked Real Time Interview Questions and Answers for Freshers - 2017 - Today News Update

Leave a Reply

Your email address will not be published. Required fields are marked *