java2---hello world

    技术2022-07-10  147

    1:打印输出功能: System.out.println(“xxxx”); 此句的功能就是把红色部分的字符串输出到控制台里显示。(控制台:console窗口) 2:ctr+s 保存代码 3:例子

    package java1; public class Helloworld { public static void main(String[] args) { System.out.println("helloworld!"); System.out.println("Lisa,you are beatiful!"); System.out.println("Try your best to get what you desire!") } }

    4:拼接输出 (1)字符串+字符串,如 “hello”+“中国” (2) 字符串+数字,如 “分数”+99.5 (3)混合拼接,如 ”数学 :“+140+”,英语:”+130 5:idea 的格式化 code->format code(快捷键:ctrl+alt+l) 6:制表符 tab (java里面tab空4格)

    Processed: 0.013, SQL: 9