Answer Posted / niranjanravi
Global variables are not possible in java because the
concept of Encapsulation is eliminated here.it is not in
the main() method where we declare variables.
Is This Answer Correct ? | 5 Yes | 8 No |
Post New Answer View All Answers
Write a program to print count of empty strings in java 8?
What is a variable and constant?
What is the purpose of a volatile variable?
What are the advantages of compiled language?
Can main() method in java can return any data?
Why string is immutable with example?
What is the difference between a field variable and a local variable?
Is multiple inheritance supported by java?
What do you understand by private, protected and public?
What is use of map in java?
How to write custom exception in java?
There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?
Is there any difference between nested classes and inner classes?
Can you achieve runtime polymorphism by data members?
How do you sort a set in java?