what are variables in java

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain JMS in detail.

612


What is high level language in computer?

532


What is an array length?

496


What is predicate in java?

556


Why java is made?

561






Explain about automatic type conversion in java?

565


Write java program to reverse string without using api?

547


Why is static used?

545


How many threads can java run?

554


What is an image buffer?

531


Why convert an applet to an application?

614


Why should I use abstract class?

562


Where will it be used?

1504


What is file in java?

558


What are static blocks and static initalizers in java ?

582