Java Introduction
You want the screen to show the word mint. This program writes that word. The line on the screen will be mint.
public class Mint {
public static void main(String[] args) {
System.out.println("mint");
}
}
The screen shows mint. mint is the word between the quotes in System.out.println("mint"). That line writes mint. The quotes are not on the screen. The program writes one line. There is no second line.
The first line of the program is public class Mint. Look at the screen again. The screen does not show Mint. It shows mint. The capital M in Mint and the small m in mint are not the same word. The screen uses the word between the quotes.
You can now look at this program and say what the screen shows. The screen is mint, written by System.out.println("mint"). The next page installs Java so you can run this file.
The screen is mint
The screen shows mint. System.out.println("mint") writes that word. The quotes are not on the screen. The word Mint on the first line is not on the screen.
🧠 Test Your Knowledge
Test Your Knowledge
Challenge yourself with this interactive quiz and see how well you understand the topic
📝 Instructions
- Read each question carefully
- Select the best answer for each question
- You can retake the quiz as many times as you want
- Your progress will be shown at the top