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