5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JAVA System.out.printlnを記述することが面倒なので、省略する方法

Last updated at Posted at 2015-12-22

ソースコードの先頭で、
import static java.lang.System.*;
という宣言をしておくことで、次のようなコードの記述も可能になります。

▪️例

import static java.lang.System.*;

public class Test68 {
	public static void main(String[] args) {
		out.println("System.部分を省略出来ます");
		out.println("Java");
		System.out.println("Hello World");
	}
}

▪️実行結果
System.部分を省略出来ます
Java
Hello World

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?