nano
in This Class
public class CLASS_NAME {
public static void main(String[] args) {
...
}
}
cp
which stands for "copy"
cp ORIGINAL_FILE_NAME NEW_FILE_NAME
nano
in This Classnano
to change the filenano
use the following format
nano FILE_NAME
nano
to create a new source code filejavac
the Java compiler
javac Ex3.java
$ ls Ex3.class Ex3.java
java
$ java Ex3 Hello world!
public class CLASS_NAME {
public static void main(String[] args) {
...
}
}
System.out.println(STRING);
$ cat BadHello.java public class BadHello { public static void main(String[ ] args) { println("Hello, world!") ; } } $ javac BadHello.java BadHello.java:3: cannot find symbol symbol : method println(java.lang.String) location: class BadHello println("Hello, world!") ; ^ 1 error
javac
compiler objects because it does not know println'c'/'e'because this is dividing one character by another
int | integer |
double | decimal |
bool | boolean |
char | character |
int
values are the counting numbers-3, -2, -1, 0, 1, 2, 3
double
values can also be positive or negative
8.75, -.7654, 5.1836456
bool
can have are true and falsechar
values are a single character'a' 'q' '5' '@'
char
value does not have to be a letter