Programming |
Yes
Yes
Yes
Yes
A compilation unit is a Java Source Code file.
Yes, an empty .java file is a perfectly valid source file.
Yes, a .java file contains more than one java class, provided at the most one of them is a public class.
Interpreter
The JVM spec is a blueprint for the JVM generated and owned by Sun Microsystems, now Oracle.
The JVM implementation is the actual implementation of the spec by a vendor.
The JVM Runtime is the actual running instance of a JVM implementation.
BDK (Bean Development Kit) is a tool that enables us to create, configure and connect a set of Beans and be used to test Beans without writing code.
bin contains tools such as javac, applet viewer, awt tool etc., whereas lib contains packages and variables.
Two parts in executing a Java program are:
Java Compiler is used for the compilation of a Java program.
Java Interpreter is used for executing the compiled program
PATH is used for setting up an environment for the operating systems. The operating system will look in this PATH for executables.
CLASSPATH is used for setting up the environment for Java. Java will use the classpath to find compiled classes.
You’ll need to set CLASSPATH and PATH in order to be able to run Java programs.
JavaBeans is a portable, platform-independent component model written in the Java programming language. It enables developers to write reusable components once and run them anywhere-benefiting from the platform-independent power of Java technology. JavaBeans are Java classes which adhere to certain coding conventions:
Must have setter & getters methods.
Must declare a public default constructor.
Implements Serializable interface.
A Bean is a java class that has getter and setter methods without any logic in it. It is used for holding data.
A Java class can have everything a java Bean has as well as some logic inside it.
A bean class can be a POJO class but a POJO can’t be a Java Bean class.
Unicode requires 16 bits and ASCII requires 7 bits. Although the ASCII characters use only 7 bits, it is usually represented as 8 bits. UTF-8 represents characters using 8, 16, and 18-bit patterns. UTF-16 uses 16-bit and larger bit patterns.
A class and the main( ) method declaration is required. The main method tells the application starting point.
Void is the return type of the main method.