0% found this document useful (0 votes)
3 views1 page

Java Basics: JVM, Arrays, and Variables

The document discusses key concepts in Java including: the Java Virtual Machine (JVM) which runs compiled Java code; that arrays are objects, not primitive types; local variables which are declared and initialized within methods; and that the main() method is static so it can be called by the JVM before an instance of the class is created.

Uploaded by

nainashah9
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Java Basics: JVM, Arrays, and Variables

The document discusses key concepts in Java including: the Java Virtual Machine (JVM) which runs compiled Java code; that arrays are objects, not primitive types; local variables which are declared and initialized within methods; and that the main() method is static so it can be called by the JVM before an instance of the class is created.

Uploaded by

nainashah9
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1. What is a JVM?

JVM is Java Virtual Machine which is a run time environment for the compiled java class files. 2. Are arrays primitive data types? In Java, Arrays are objects. 3. What are local variables? Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them. 4. Why is the main() method declared static? main() method is called by the JVM even before the instantiation of the class hence it is declared as static.

You might also like