ระบบการพิมพ์ของจาวา

รหัสตัวอย่าง

28
0

พิมพ์ของจาวา

//print and create new line after
System.out.println("text");
System.out.println(String);
//You can use any variable type, not just strings, although
//they are the most common

//Print without creating a new line
System.out.print("text");
System.out.print(String);
10
0

ระบบออกไปprintln

public static void main(String[] args){
	System.out.println("Hello World"); 
}
2
0

วิธีที่จะพิมพ์อยู่ของจาวา

System.out.println("Hello World!");
1
0

จากระบบออกไปprintln

System.out.print(<string>); //prints in the same line as the previous print
System.out.println(<string>); //prints in a new line

// Example
System.out.print("This ");
System.out.print("will ");
System.out.print("be ");
System.out.print("all ");
System.out.print("in ");
System.out.print("one ");
System.out.print("line.");

System.out.println("Hello World!");
System.out.println("second line");
1
0

ระบบออกไปเขียนในพื้นที่วาดภาพตัวอย่างเช่น

public class JavaPrintStreamWriteExample4 {
public static void main(String[] args) {
//out is the object class PrintStream.
byte[] b= {115,104,117,98,104,97,109,95,106,97,100,111,110};
System.out.write(b, 0, 13);
System.out.println();
System.out.print("Successfully printed byte array to this stream.");
}

ในภาษาอื่นๆ

หน้านี้อยู่ในภาษาอื่นๆ

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................