Professional Documents
Culture Documents
Lab Work 1
Lab Work 1
Programming.
Task 1.
c. In your opinion, what is the relationship of both java class name and java file
name above?
d. Print the command prompt window by pressing button ctrl + print screen
simultaneously, and attach here
Lab Work 1 : Welcome To Java, The fascinating world of
Programming.
Task 2.
By using the step in task 1, write, compile and execute the following java
program and answer the question given.
import javax.swing.JOptionPane;
public class HelloGraphic {
public static void main(String[] args){
JOptionPane.showMessageDialog(null,"Hi!! Hello World");
}
}
b. What is the file name should be given to the above java program?
c. In your opinion, what will happen if the filename and the class name are
not identical?
d. Attach here the result/windows when executing the above java program
Lab Work 1 : Welcome To Java, The fascinating world of
Programming.
Task 3.
Hello World!!!
onto screen.
Task 4.
By referring to Task 2, write a java program that displays the following window
message onto screen.