Java object-oriented face question

Source: Internet
Author: User
Tags bitwise bitwise operators decimal to binary

2. How does Java cross-platform?
SOURCE program (Java)--byte code (binary Class)--Class loader (load)-Bytecode verifier-interpreter (different versions, cross-platform root cause)---operating system platform (compiled and interpreted language) compile: Generate a new file. Explanation: No new files were generated.
What is the implementation process of 3.java programmers?
First the programmer writes the Java source file, then the Javac (compile) command to manipulate the source file to write it as a class file, in the Java (Run) command into the class loader, and then a byte-code detector to its test, error-proof through the interpreter explained to the operating system execution.
What is the difference between 4.JDK and JRE?
Development Kit and runtime Environment (no compilers), JDK contains JRE, compiler, debugger, API documentation, etc. required by developers, JRE contains only the running environment.
What are the 5.java data types?
(1). In what way to express data, (2). How much space is divided into storage data.
Decimal to binary, multiply by 2 to take the number of digits, such as 0.8125 is 0.1101, so floating point error. BYTE 256
Basic data type: integer floating-point character Fubur
Reference data type: class, array, interface, reference only four bytes.
6. Why are constants defined?
Literal constants: Data written directly in the code
Symbolic constants: final-defined alias constants
(1) Bring the business meaning into the value, see the name of the idea. (2) easy to modify.
The first letter of the variable is lowercase and the following word is capitalized.
The difference between 7.&& and &
& is a bitwise operator, compared by bitwise, such as 5&4 4, 0, and 1,&& are logical operators. | For bitwise operators, such as 5|4, the 5,~ is a bitwise negation of 2. ^ xor: The same takes 0, the difference is 1,5^4 for 1 then any number XOR itself is 0, any number XOR or 0 for itself. Also called Flip face. 1? 2:3,1 is true, the expression 2 is executed, otherwise 3 is executed. When you do a type conversion, it can be converted if it contains the maximum constant value.

(Object-oriented)

Object-oriented three features: three major features: encapsulation, polymorphism, inheritance (Abstract: not sure yet)

How the Virtual Machine Works: source program--java Compiler--byte code--Class loader--bytecode detector--interpreter--operating system platform. Java Cross-platform: The interpreter is the root cause of the Java cross-platform. (open source) interpreter + compiler Jre:java Runtime environment (including: User Install JRE) Jdk:java Run tool including JRE, compiler API document Java Execution process: The programmer writes the source file first, then the compiler by Javac command, Source files compiled into bytecode files, and then run through the Java command, the process of running the first through the class loader, the bytecode file loaded into memory, and then through the bytecode checker to verify the error, through the interpreter to the system execution. Bytecode is the same, but it is interpreted by the interpreter on different operating platforms. Data type: Role: How to express data in any way. How much space to store data. Base type: integer type: byte short int long floating-point type: Short Double boolean: boolean character: Char constant: (final) Two: 1. Literal constants 2. Symbolic Constants (1. Bring business meaning into constant value 2. Easy to modify) &am p;: bitwise operator; can be used as a logical judgment. No short-circuit &&&: logical operator% symbol cannot have decimal at the front and back end. ~ Bit non.   What is encapsulation: Meaning: 1. Assembly Class A {attribute//Value data method//Behavior, function} 2. Information hiding: 1. Access modifiers: (3 keywords, 4 cases) 2. Implementation ID (attribute) of the method: Unique identifier (non-null); Standard Java class specification--java Bean:1. There must be a public, non-parametric construct. 2. You must provide a Get,set method that conforms to the command specification for the private property.Inheritance: extends--single inheritance: (Attributes will inherit, and the method will continue.)     Depending on the access modifier, the constructor does not inherit: syntax, thought single-Inheritance--object (Root Class) 1.toswing: Returns a description of an object string                                    /      2.E Quals: Determine whether two objects are equal in business                             &NBSP ;         "= =" is to determine whether two references point to the same image.                                  &NBS P         3.FINALIZE:PROTECTDE (protected)                   &NBS P                             gc : Call the (finalize) method Recycle object                               & nbsp                 &NBSp; finalize--destroying objects running mechanism: memory overlay.     inheritance: is a relationship attribute: has  a relationship parameter: Use  a relationship    constantly extracting parent class to some extent-abstract method (abstract class). Abstract method: A class with abstract methods must not produce objects (because objects are concrete actual existence, it is impossible to have unknown behavior) all this class must be abstract class. The syntax allows abstract classes to have no abstract method, but it loses the meaning of design abstraction. Final (keyword): Classes that can be decorated (the final class) cannot be changed.   

A small part of the flowchart for object-oriented summarization

Java object-oriented face question

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.