1. Java What are the basic data types in? How many bytes each? What are the reference data types in Java? What encoding does the char type use in basic data Java?
byte byte 1 byte, short shorter integer 2 byte, int integer 4 byte, long length integer 8 bytes, float single precision 4 byte, double double type 8 byte, char character type 2 Byte, Boolean Boolean 1 byte;
Java Reference type: class, array, interface;
Java basic data type, which holds the address of the object that the data, Java reference type holds;
The char type is Unicode encoded;
2. What are the three elements of a variable?
Variable name, data type, variable value
3. Java How many comments are there?
Single-line comment,/* */Multiline Comment,/** */Document comment (can generate help document with Javadoc)
4. What are the keywords for defining constants?
Final
5. What is an object? What is a class? What are the relationships between objects and classes?
An object is a concrete entity that has definite characteristics and behavior, and is the result of encapsulation of data;
Class: Is a set of objects that have the same properties and behaviors;
A class is an abstraction of an object that is an instance of a class;
Java Fundamentals 2