摘要:
算术运算符**** public class OperatorDemo { public static void main(String[] args) { //++在前在后,如果是单独使用没有区别,如果是参与运算,++在前面先自增,再运算;++在后面先运算,再自增 int a = 2; int c 阅读全文
摘要:
字符串 public class TestString { public static void main(String[] args){ String str = "214234235"; System.out.println(str); } } 数组 public class ArrayDemo 阅读全文
摘要:
java流程控制语句 1.if的三种格式 格式1: public class TestIf { public static void main(String[] args) { //流程控制语句:if //格式1:一般作为单条件判断 int age = 17; if (age>=18) { Syst 阅读全文
摘要:
Java是一个强类型语言 就是必须要先申明是什么类型的,才可以定义,如: public class Var { public static void main(String[] args) { int i = 1; // 不能写 i = 1; System.out.println(i); } } 修 阅读全文