Home > Java > javaTutorial > Java language overview

Java language overview

巴扎黑
Release: 2017-06-23 15:47:38
Original
2136 people have browsed it

I personally believe that the basis for learning a programming language is to learn from demos.

Practice the console output tool. System.out.println outputs newlines, and System.out.print outputs no newlines.

package com;
public class Test {
public static void main(String[] args) {
System.out.println("hello, Tang Huimin.");
System.out.println(args[0]);
System.out.println(args[1]);
}
}

Configuration parameter args:

Run result:

package com;
public class Test {
public static void main(String[] args ) {
System.out.print("hello, Tang Huimin.");
System.out.print(args[0]);
System.out.print(args[1]);
}
}

Run result:

Output a triangle composed of "*"

package com;
public class Test {
public static void main(String[] args) {
System.out.println(" *");
System.out.println(" ***");
System.out.println("*****");
System.out.println("*****");
}
}

Run result:

Output symbol expression

package com;
public class Test {
public static void main(String[] args ) {
System.out.println(" ╭︿︿︿╮ ");
System.out.println(" {/ o o /}");
System.out.println(" ( (oo) )");
System.out.println(" ︶ ︶︶");
}
}

Result:

The above is the detailed content of Java language overview. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Install JAVA
From 1970-01-01 08:00:00
0
0
0
Unable to install java
From 1970-01-01 08:00:00
0
0
0
Can java be used as the backend of the web?
From 1970-01-01 08:00:00
0
0
0
Is this in Java language?
From 1970-01-01 08:00:00
0
0
0
Help: JAVA encrypted data PHP decryption
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template