what are variables in java
Answers were Sorted based on User's Feedback
Answer / hemanta paudel
Every data are store in memory and that memory has literal
name that is called variable.There are two type of variable
in java
1. Local variable :- that variable which is declare in
method body or argument list called as local variable and
its are store in stack.
2. Instance Variable:-those variable which are declare
within a class and obtain the memory when the instance of
class is created. Each instance have own variable.
3. Static or class variable:- those variable which are
declare using static keyword and they are load in memory
when class is loaded.
| Is This Answer Correct ? | 10 Yes | 0 No |
Answer / rhupendra
variables are define by data type
if we want to use the memory that we have to use data type
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / rice
Java support Three types of variables
1.)static
2.)Instance
3.)Local
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / monu sharma
Two types of variables in java
1)Static variable
2)Dynamic variables
Variables :Declaring, instantiating, initializing, and
manipulating a reference variable
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / guest
Instance variables-within the class
Local variables-within the methods
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / naga sayan
varaiable is a name given to a memory location.ther are two
types of variables.I java variables are nothing but data
members
static variables and dynamic variables
| Is This Answer Correct ? | 0 Yes | 2 No |
How many types of classes are there in java?
what really hapens when a object is created using new operator? 1.is it allocates memory to all variables and methods in the class with reference to that object?
which swing component is similar to rich text box in .net/vb
How to transfer data from an Applet to Servlet ?
What is use of inner class in java?
How do weakhashmap works?
is it possible to add a object in a HASHMAP
What is meant by Encapsulation? Can you write a class to explain encapsulation?
Difference between String and String Buffer?
What is the difference between method and constructor ?
How does thread synchronization occurs inside a monitor?
How to check if a list is sorted in java?