今天就这样吧,吃多了嚼不烂
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,6 @@
|
||||
### IntelliJ IDEA ###
|
||||
.idea/
|
||||
./*.iml
|
||||
out/
|
||||
!**/src/main/**/out/
|
||||
!**/src/test/**/out/
|
||||
|
||||
14
src/class4/VaruableDemo2.java
Normal file
14
src/class4/VaruableDemo2.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package class4;
|
||||
|
||||
public class VaruableDemo2 {
|
||||
public static void main(String[] args) {
|
||||
printLiteral();
|
||||
}
|
||||
public static void printLiteral()
|
||||
{
|
||||
char ch = 'A';
|
||||
System.out.println(ch + 1);
|
||||
char ch2 = 'a';
|
||||
System.out.println(ch2 + 1);
|
||||
}
|
||||
}
|
||||
31
src/class5/VariableDemo3.java
Normal file
31
src/class5/VariableDemo3.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package class5;
|
||||
|
||||
public class VariableDemo3 {
|
||||
public static void main(String[] args) {
|
||||
printVariable();
|
||||
}
|
||||
public static void printVariable(){
|
||||
byte b = 10;
|
||||
|
||||
short s = 20;
|
||||
int i = 30;
|
||||
long l = 40;
|
||||
float f = 1.1F;
|
||||
double d = 2.2;
|
||||
|
||||
char c = 'a';
|
||||
|
||||
boolean bool = true;
|
||||
|
||||
String str = "hello";
|
||||
System.out.println(str);
|
||||
System.out.println(bool);
|
||||
System.out.println(c);
|
||||
System.out.println(d);
|
||||
System.out.println(f);
|
||||
System.out.println(l);
|
||||
System.out.println(i);
|
||||
System.out.println(s);
|
||||
System.out.println(b);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user