Home> Java> JavaBase> body text

What is the shortcut key for java output statement?

coldplay.xixi
Release: 2020-10-23 11:56:31
Original
19328 people have browsed it

The shortcut key for java output statement is to enter syso and press [alt /]: first import the package; then create the object in the main function; finally output the string, use the shortcut key [alt /].

What is the shortcut key for java output statement?

The shortcut key for java output statement is to enter syso and press [alt /]

First: import the package import java.util.Scanner;

Then: create the object in the main function, eg: Scanner input=new Scanner(System.in);

Finally, if you want to input a string, String a=input.next();

If you want to enter an integer, then int b=input.nextInt();

Don’t forget to add input after writing the input statement. close(); otherwise there will be a warning, which may cause memory leaks later.

Output: String: System.out.println("love");

Integer: System.out.print("123");

Output shortcut keys : After entering syso, press alt /

Related learning recommendations:java basic tutorial

The above is the detailed content of What is the shortcut key for java output statement?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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 Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!