Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

Core Java Interview Questions Page 2, Core Java QuestionQ

This page discusses - Core Java Interview Questions Page 2, Core Java QuestionQ

Ads

Tutorials   
Hibernate Interview Questions - What is Hibernate Framework? Hibernate Interview Questions JSF Basic Interview Questions Important Interview Questions in Core Java Core java Interview Questions XML Interviews Question page8,xml Interviews Guide,xml Interviews XML Interviews Question page7,xml Interviews Guide,xml Interviews XML Interviews Question page6,xml Interviews Guide,xml Interviews XML Interviews Question page5,xml Interviews Guide,xml Interviews XML Interviews Question page1,xml Interviews Guide,xml Interviews XML Interviews Question page30,xml Interviews Guide,xml Interviews XML Interviews Question page29,xml Interviews Guide,xml Interviews XML Interviews Question page28,xml Interviews Guide,xml Interviews XML Interviews Question page27,xml Interviews Guide,xml Interviews XML Interviews Question page26,xml Interviews Guide,xml Interviews XML Interviews Question page25,xml Interviews Guide,xml Interviews XML Interviews Question page24,xml Interviews Guide,xml Interviews XML Interviews Question page23,xml Interviews Guide,xml Interviews XML Interviews Question page22,xml Interviews Guide,xml Interviews XML Interviews Question page21,xml Interviews Guide,xml Interviews XML Interviews Question page1,xml Interviews Guide,xml Interviews XML Interviews Question page18,xml Interviews Guide,xml Interviews XML Interviews Question page17,xml Interviews Guide,xml Interviews XML Interviews Question page16,xml Interviews Guide,xml Interviews XML Interviews Question page15,xml Interviews Guide,xml Interviews XML Interviews Question page14,xml Interviews Guide,xml Interviews XML Interviews Question page13,xml Interviews Guide,xml Interviews XML Interviews Question page11,xml Interviews Guide,xml Interviews XML Interviews Question page1,xml Interviews Guide,xml Interviews SQL PL/SQL Terms Deadlock JSF Interview Questions Tomahawk inputCalendar tag Java Questions & Java FAQ J2EE Interviews Question page9,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page8,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page7,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page6,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page5,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page4,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page3,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page20,J2EE Interviews Guide,J2EE Interviews J2EE interview questions page2,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page19,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page18,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page17,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page16,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page15,J2EE Interviews Guide,J2EE Interviews J2EE Interviews Question page14,J2EE Interviews Guide,J2EE Interviews
Ads

Core Java Interview Questions -2

     

Question: What is the use of Object and Class Classes?
Answer: The Object class is the superclass of all other classes and it is highest-level class in the Java class hierarchy. Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float, and double), and the keyword void are also represented as Class objects.

Question: Differentiate between a Class and an Object?
Answer:
A Class is only the definition or prototype of real life object. Whereas an object is an instance or living representation of real life object. Every object belongs to a class and every class contains one or more related objects.

Question: What do you understand by a variable?
Answer: The variables plays very important role in computer programming. Variables enable programmers to write flexible programs. It is a memory location that has been named so that it can be easily be referred in the program. The variable is used to hold the data and it can be changed changed during the course of the execution of the program.

Question: What do you understand by numeric promotion?
Answer: The Numeric promotion is the conversion of a smaller numeric type to a larger numeric type, so that integer and floating-point operations may take place. In the numerical promotion process the byte, char, and short values are converted to int values. The int values are also converted to long values, if necessary. The long and float values are converted to double values, as required 

Question: What do you understand by casting in java language?
Answer: The process of converting one datatype to another in Java language is called Casting.

Question: What are the types of casting?
Answer: There are two types of casting in Java, these are Implicit casting and explicit casting.

Question: What is Implicit casting?
Answer: Implicit casting is the process of simply assigning one entity to another without any transformation guidance to the compiler. This type of casting is not permitted in all kinds of transformations and may not workout for all application scenarios.

Example:

int i = 4000;

long h = i; //Implicit casting

Question: What is explicit casting?
Answer:
Explicit casting in the process in which the complier are specifically informed to about transforming the object.

long ln = 700.20;

t = (int) ln; //Explicit casting

Question: What do you understand by downcasting?
Answer: The process of Downcasting refers to the casting from a general to a more specific type, i.e. casting down the hierarchy

Question: What do you understand by downcasting?
Answer: The process of Downcasting refers to the casting from a general to a more specific type, i.e. casting down the hierarchy

Question: What do you understand by final value?
Answer: FINAL for a variable: value is constant. FINAL for a method: cannot be overridden. FINAL for a class: cannot be derived

.

Advertisements

Share on Google+Share on Google+

Core Java Interview Questions Page 2, Core Java QuestionQ

Posted on: April 18, 2011 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Core Java Interview Questions Page 2, Core Java QuestionQ  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads