I personally think that the basis of learning programming language is to learn from the demo.
Practice console output things, System.out.println output line, System.out.print output does not wrap.
Package com;
public class Test {
public static void Main (string[] args) {
System.out.println ("Hello, Tanghuimin. ");
System.out.println (Args[0]);
System.out.println (Args[1]);
}
}
Configuration parameters args:
Operation Result:
Package com;
public class Test {
public static void Main (string[] args) {
System.out.print ("Hello, Tanghuimin. ");
System.out.print (Args[0]);
System.out.print (Args[1]);
}
}
Operation 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 ("*******");
}
}
Operation Result:
Output symbol Emoticons
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 ("︶︶︶");
}
}
Results:
Java language Overview