Explain about global variables in Java?

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


Please Help Members By Posting Answers For Below Questions

What is static data type in java?

546


How to sort an array from smallest to largest java?

548


What is the best way to findout the time/memory consuming process?

558


Does java allow default arguments?

592


What is Mutex (Mutual Exclusion Object) ?

629






Difference between this() and super() ?

583


What is lexicographically smallest string?

607


How does indexof work?

507


What is a Null object?

892


What are different data types?

577


Difference between Linked list and Queue?

613


What is the difference between yield() and sleep()?

546


Explain about oops concepts.

638


What is the parse method in java?

573


Is integer passed by reference in java?

572