answersLogoWhite

0

in order to acheive a inheritance and data encapsulation property global variables are not declared in java.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the syntax of global variable in java?

There's no global variables in Java.


Is Variable declaration in event handlers begin with keyboard declar?

No. There is no such keyword as declar in Java.


Why there are no global variables in java?

Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:The global variables breaks the referential transparencyGlobal variables creates collisions in namespac


What is native variable in java?

native is a key word used in java method. there is no variable as native in java


What is global variable in java?

A local class is declared locally within a block of Java code.You can even have classes declared inside a method. such classes are called local classes.


Declaration can appear anywhere in the body of java method ATrue B False?

Partially true and partially false. A variable's declaration must happen atleast one life before the usage of that variable. Therefore we can take this as declaration can be done anywhere provided we declare it before the usage. otherwise it would throw a compilation error.


What is pointer in java?

There is no concept similar to pointers in Java. Pointers are a feature in C programming using which a programmer can access the memory. This was the cause of major catastrophic programming bugs. The creators of Java excluded this feature just to avoid such catastrophic bugs.


How you make shared and synchronized variable in java thread?

A Variable that is shared as well as synchronized cannot be created in Java. These two terms are mutually exclusive and a variable that is synchronized in java cannot be shared and vice versa


What does java not support?

Java does not support multiple inheritance.......


Explain the structure of a java program?

The fundamental structure of any Java programme should look like: [package declarations] [import statements] [class declaration] An example is given below: package abc; import java.lang; class Demo { public static void main(String[] args) { Sytem.out.println("Hello! World"); } } //The file containing this class must be named Demo.java


What is a variable type in Java?

int


Can you define variables in interface in java?

yes we can define a variable in an interface in java.