Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain Global variables in Packages?

Answers were Sorted based on User's Feedback



Explain Global variables in Packages?..

Answer / milind

i think der is no such thing global variable in java....
instance variable
local vaiable is in java

Is This Answer Correct ?    0 Yes 0 No

Explain Global variables in Packages?..

Answer / preetesh

There is no term as Global variable in Java.
Types of variable: 1) Local Variable declared within method.
2) Instance Variable declared within class but outside
method.
3) Class Variable
4) Parameters are also treated as variables

Example:
--------
public class Global {
public static int i = 25;
public static String s = "Preetesh";
}

//Such members can be accessed as:

public class Test {
public static void main(String[] args)
{
Global.i = Global.i + 100;
Global.s = "Java";
}
}

Is This Answer Correct ?    0 Yes 0 No

Explain Global variables in Packages?..

Answer / therathna

for what package r u asking

there is no meaning for Global variables in Packages

Is This Answer Correct ?    0 Yes 1 No

Explain Global variables in Packages?..

Answer / anitha

expect private,all public,protected and default variables
are global in a package

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Core Java Interview Questions

Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.

0 Answers  


Explain exception chaining in java?

0 Answers   Cyient,


How to declare objects of a class ?

0 Answers   Akamai Technologies,


Which is easier .net or java?

0 Answers  


Can inner class extend any class?

0 Answers  


What is an exception?

6 Answers  


can any one tell me what is advantage of encapsulation

2 Answers  


What is the meaning of variable in research?

0 Answers  


What does sizeof return?

0 Answers  


Which is better list or arraylist in java?

0 Answers  


What does a za z0 9 mean?

0 Answers  


What methods are used in Servlet?Applet communication?

0 Answers   Satyam,


Categories