|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: What is the datatypes in java?
Answer: A variable's data type determines the values the variable can contain and the operations that can be performed on it.
The Java programming language has two categories of data types —
a)Primitive
b)Reference(A data element whose value is an address.).
A variable of Primitive data type contains a single value of the appropriate size and format for it's type.For example integer,float,char, and boolean are all primitive data types.
Arrays,Classes and Interfaces are reference types.The value of a reference type varriable is a reference(an address of)the value or set of values represented by the varriable.
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9257 users |
Added on |
7/16/2011 |
Views |
71848 |
Rate it! |
|
|
Question:
What is the datatypes in java?
Answer:
A variable's data type determines the values the variable can contain and the operations that can be performed on it.
The Java programming language has two categories of data types —
a)Primitive
b)Reference(A data element whose value is an address.).
A variable of Primitive data type contains a single value of the appropriate size and format for it's type.For example integer,float,char, and boolean are all primitive data types.
Arrays,Classes and Interfaces are reference types.The value of a reference type varriable is a reference(an address of)the value or set of values represented by the varriable.
Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How can we inherit the two independent classes in one class? for example, we have two independent classes like Class A and B. I want to inherit the methods of Class A and B.
|
View Answer
|
|
Why java shouldbe preferred,when we can get the sameoutput using VB orany otherlanguages. Howcan we convincethe interviewer ,other than givingthe simple features ofjava. could anyone pls answer this question?
|
View Answer
|
|
Why we cannot define constructor of super class in a sub class ?
|
View Answer
|
|
In client-server approach, how to get an IP address of remote machine, and how we can find whether tht machine is connected with server or not. I hv found one solution is pinging in background, but how we can do such pinging? how can we find out tht we r getting reply of ping?
|
View Answer
|
|
let say there are two interfaces like the following
interface int1{ int meth1(); }
interface int22{ int meth1(); }
ok then
i am implementing both of them in a calss as follows
class mycl implements int1,int2 {}
now as the rule says, if a class implements an interface it must complete its signature. now my questions is that if i define meth1(), as that method is in both interface, may i know how can i define both of that methods. please answer me
|
View Answer
|
|
How to use printer option in java or is there any method to use print command?
|
View Answer
|
|
What is the main difference between input, output stream?
|
View Answer
|
|
what happens if i do this=null? 2)how to swap 2 variables without using third temp variable in java? 3)constructors can not be inherited,why?
|
View Answer
|
|
Can we serialize the static variable?
|
View Answer
|
|
Why is the Object class super class of all the classes?
|
View Answer
|
|
How do you push an applet in to the servlet?
|
View Answer
|
|
What is a refferent?
|
View Answer
|
|
What is the difference between synchronized block and normal block ?
|
View Answer
|
|
Is there any provision in java to find the address of a particular memory location?(like & in 'C' language)
|
View Answer
|
|
What is the difference between trusted and untrusted applet?
|
View Answer
|
|
Why should every class in java extend Object class?
|
View Answer
|
|
Why is collection framework called as framework?
|
View Answer
|
|
A Inner class is defined in a parameterized function of outer class then the inner class is able to access the parameters of that function?
|
View Answer
|
|
Advantages of Implementing Runnable over extending Thread
|
View Answer
|
|
How to access Blob and Clob data values from oracle thru java?
|
View Answer
|