Java入门总结

根据Udemy的Java教程写的笔记,新手友好。
🔗:https://www.udemy.com/course/learn-java-programming-java-beginners-course/

基础语法

public class name {
          public static void main(String[] args){
                 System.out.println("This is the 2nd instruction that  i have executed");
                 System.out.print("my name is ");
}
}

缩写 psvm tab
缩写 sout tab
缩写 souf tab

operators

arithmetic operators
relational operators
logical operators
assignment operators

concatenation

public class concatenation {
    public static void main(String[] args) {

        int number =10;
        String text = "test";
        double doubleNumber = 11.1;
        float floatNumber = 11.1F;
        boolean truth = true;
        char  c = '*';
        System.out.println("my string vatriable has the value "+text);

        System.out.printf("I have decalred a string variable with the value %s",text);
        System.out.println();
        System.out.printf("I have decalred a int varibale with the value %d",number);
        System.out.println();
        System.out.printf("I have decalred a double varibale %f " +
                "and a string with the value %s", doubleNumber,text);
        System.out.println();
        System.out.printf("We are decalring a boolean %b",truth);

    }
}

char %c
int %d
double %f

equality of two strings

Java is a case sensitve language

.equalsIgnoreCase

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 一、JAVA的特点 特点一:完全面向对象 两个基本概念:类、对象 三大特性:封装、继承、多态 特点二:健壮性 吸收...
    冬雪凉阅读 1,501评论 0 0
  • 俗话说“工欲善其事,必先利其器”。学好一门技术,首先必须要用好工具,这个可以使自己工作效率得到提升,炫酷的快捷键也...
    Michaelhbjian阅读 5,160评论 1 3
  • 以前都用的是windows,现在要转成mac了,哪哪都不习惯啊。 Mac快捷键 https://support.a...
    JaclynWu阅读 1,456评论 0 0
  • 精心收集整理的教程笔记 第01天 Java基础入门 第1章计算机基础 1.1计算机 计算机(computer)俗称...
    Java帮帮阅读 11,196评论 1 109
  • 十大Intellij IDEA快捷键 1 智能提示 Intellij首当其冲的当然就是Intelligence智能...
    月生89阅读 3,110评论 0 0