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

Core Java Concepts Overview

The document explains core Java concepts, including the Java Virtual Machine (JVM), which executes Java bytecode by providing a runtime environment. It also discusses AWT and Swing, Java GUI toolkits, with Swing offering more advanced components. An example code snippet demonstrates creating a button with an Action Listener in a JFrame.

Uploaded by

ajayjallendhra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Core Java Concepts Overview

The document explains core Java concepts, including the Java Virtual Machine (JVM), which executes Java bytecode by providing a runtime environment. It also discusses AWT and Swing, Java GUI toolkits, with Swing offering more advanced components. An example code snippet demonstrates creating a button with an Action Listener in a JFrame.

Uploaded by

ajayjallendhra
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Core Concepts

1. What is the JVM? Explain Runtime Environment in Java.

The JVM (Java Virtual Machine) is an engine that provides a runtime environment to execute Java bytecode.

Java source code is compiled into bytecode by the Java compiler, and this bytecode is interpreted or

compiled to native machine code by the JVM.

...

17. What are AWT and Swing Packages? Create a button with Action Listener.

AWT (Abstract Window Toolkit) and Swing are Java GUI toolkits. Swing is built on AWT and provides more

powerful components.

Example:

JFrame f = new JFrame("Example");

JButton b = new JButton("Click Me");

[Link](50, 100, 95, 30);

[Link](e -> [Link]("Clicked"));

[Link](b);

[Link](200, 200);

[Link](null);

[Link](true);

Page 1

You might also like