Java Fundamentals Part-2
Java Fundamentals Part-2
Java Fundamentals
Operations on data:
1) (byte, short, int, char) + (byte, short, int, char) => int
2) (byte, short, int, long, char) + long => long
3) (byte, short, int, long, float, char) + float => float
4) (byte, short, int, long, float, double, char) + double => double
Note: Operations cannot be performed on booleantypes.
Compilation:
C:\>javac Demo.java
The Java compiler generates .class file for every class in a source file.
Execution:
C:\>java Demo
A class that contains main() method only can be used to execute the program.
javac& java are called jdk tools. All jdk tools are the part of bin folder in JDK.
JDK stands for Java Development Kit. It is called as Java Software. Latest version of
JDK is 15.
Path Setting:
Right click on This PC icon, click on Properties menu item, click on Advanced
System Settings, click on Environment Variables button, click on New button
under user variables type Variable Name is path & type Variable Value is
C:\Program Files\Java\jdk-15\bin; Click on Ok button.
If the path variable already exists then select the path variable, click on edit
button, append the path C:\Program Files\Java\jdk-15\bin;
Note: Before setting the path check jdk folder name in Java folder.