JAVA Oo Getting Started knowledge

Source: Internet
Author: User

Speaking of the Java language begins with the origins of Java

1. Starting from Green Project

2. Set C,c++,lisp, in one

Java Oo, known as Object-oriented language, is a programming language that takes objects as the basic program structure unit. Used to describe an object-centric program structure. Second, object-oriented is class-based.

The three basic features of object-oriented include

1. Encapsulation

This means that each individual function is designed to be a separate, reusable method unit. Easy to modify the program, reduce the redundancy of the code.

2. Inheritance

Occurs between two objects, an inherited object can use some of the properties of the inherited object

3. polymorphic

Different occasions to make different responses have different characteristics is an implementation of the package

Here are some basics of Java

1.JAVA is the same as many functions to enter the program with the main function

Use the connection symbol "+" for structured output in 2.JAVA

Data types in 3.JAVA can be divided into two types from a macro level: A basic type reference type

3.1 Basic types:

Basic types include: numeric (byte.short.int.long.float.double), char (char), Boolean (True.false)

Reference types include: classes. Excuses. Array (class,interface)

4. Use final when defining the brightness to modify constants to immutable values

5. You need to import the input header file (import Java.util.Scanner) when using the input function (Scanner input=new Scanner (system.in)) where you receive the shaping value input with Input.nextint ( );

Receive string input with Input.next ();

6. Quote System pseudo random number use function math (random) The randomly generated number is the number of 0.0~0.1 if the number to be randomly generated is the other range eg:

int random= (int) (Math.random () *100) The number generated at this time is 1-100

7. Compare strings for input with. Equals to concatenate two strings

JAVA Oo Getting Started knowledge

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.