Initial Java,

Source: Internet
Author: User

James Goslin the father of Java.

Divided into three major areas: J2SE-ee J2ME

Two big platforms: JVM API

8 data Types integer floating-point character type Boolean class interface array

Generally used in addition to the back of the two

The program flow inside JAVA is now known to have if/else switch for while Do/while

For and while are judged before they are executed

General for use is more likely to be used will be more convenient

Here is a For loop example

Output 99 multiplication table

Package yuanzhoulv;

public class Dierti {
public static void Main (string[] args) {
int s;
for (int m=1;m<=9;m++) {
for (int n=1;n<=m;n++) {
S=m*n;
System.out.print (n+ "*" +m+ "=" +s);
System.out.print ("\ t");
}
System.out.print ("\ n");

}

}

}

Personally, I think it's amazing how the output looks.

1*1=1
1*2=22*2=4
1*3=32*3=63*3=9
1*4=42*4=83*4=124*4=16
1*5=52*5=103*5=154*5=205*5=25
1*6=62*6=123*6=184*6=245*6=306*6=36
1*7=72*7=143*7=214*7=285*7=356*7=427*7=49
1*8=82*8=163*8=244*8=325*8=406*8=487*8=568*8=64
1*9=92*9=183*9=274*9=365*9=456*9=547*9=638*9=729*9=81

Initial Java,

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.