WorksheetsProgramming Fundamentals (Lab 1)
Total questions: 7
Worksheet time: 5mins
What is the function of the 'dir' command in the command prompt?
Deletes a file
Lists files and directories in the current location
Opens a folder
Copies files
What does the command 'cd ..' do in the command line?
Creates a new directory
Changes file type
Moves to the parent directory
Clears the screen
When saving a Java program file, what should the file extension be?
.txt
.class
.java
.exe
What command is used to compile a Java program in the terminal?
javac
compile
java
exec
After compiling a Java file, which command is used to execute it?
compile
javac
java
run
In a basic Java program, which statement is used to display text on the screen?
echo
print()
display()
System.out.println()
What is the main rule for creating a Java file.
Class Name must be same as the File Name (Exactly Same)
Class Name can be different.
Class Name must be same but in Lower Case Letters all.
Class Name must be same but in Upper Case Letters all.
