GeekInterview.com
Series: Subject: Topic:
Question: 68 of 78

In this example class-var = new classname( ); class-var is a variable of the class type being created

A) True
B) False
Asked by: Interview Candidate | Asked on: Dec 10th, 2005
Showing Answers 1 - 9 of 9 Answers
kchanakya

Answered On : Feb 18th, 2006

View all answers by kchanakya

true

  
Login to rate this answer.
supriya ahire

Answered On : Mar 23rd, 2006

 True.

  

  
Login to rate this answer.
pdurbha

Answered On : Apr 30th, 2006

View all answers by pdurbha

 How can class-var be a variable of the class type. It is an object or an instance of the classtype.

A variable is an attribute of the instance class-var..class-var by itself cannot be a variable.

My answer is false.

  
Login to rate this answer.
Velmurugan.S

Answered On : Apr 12th, 2007

class-var is instance or reference.
Its not a variable

  
Login to rate this answer.
sukace

Answered On : Nov 20th, 2007

View all answers by sukace

class-var can be an instance and even if taken as a variable it can be either of the class classname or a supertype of it.
My ans is FALSE

  
Login to rate this answer.
nkamuni

Answered On : Dec 19th, 2007

View all answers by nkamuni

Let us take an example of a data type int.

eg: int i;

Now i is the variable of the data type int and int can store numeric data.
let us see this now.

class A{
 int  i;
}

public class AA{

public static void main(String args[])
A objA = new A();
}

What is happening here that we are creating a new variable objA which can handle the data and methods of A.

So, it is true to say that class-var is a variable of the class type being created.

  
Login to rate this answer.
aparna.g

Answered On : Jul 23rd, 2008

View all answers by aparna.g

false

  
Login to rate this answer.
ksrikanth5g

Answered On : Jul 24th, 2008

View all answers by ksrikanth5g

no its not create a object

  
Login to rate this answer.
tarun_1984

Answered On : Jun 19th, 2009

View all answers by tarun_1984

In this Question in the given example class-var is nothing but an object of class classname

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.