0
0
Javaprogramming~15 mins

What is Java - Hands-On Activity

Choose your learning style9 modes available
What is Java
📖 Scenario: Imagine you want to learn a popular programming language used to create many types of software, from mobile apps to large systems.
🎯 Goal: You will write simple Java code to understand what Java is and see a basic program that prints a message.
📋 What You'll Learn
Create a Java class named WhatIsJava
Add a main method inside the class
Print the message "Java is a popular programming language." to the console
💡 Why This Matters
🌍 Real World
Java is used to build mobile apps, games, websites, and big business software.
💼 Career
Knowing Java opens doors to many programming jobs in software development.
Progress0 / 4 steps
1
Create the Java class
Create a public Java class called WhatIsJava.
Java
Need a hint?

In Java, every program starts with a class. Use public class WhatIsJava { }.

2
Add the main method
Inside the WhatIsJava class, add the public static void main(String[] args) method.
Java
Need a hint?

The main method is the entry point of a Java program. Use public static void main(String[] args).

3
Print a message
Inside the main method, write a line to print "Java is a popular programming language." using System.out.println.
Java
Need a hint?

Use System.out.println("message") to print text to the console.

4
Run and see the output
Run the program and print the output to the console.
Java
Need a hint?

When you run the program, the message should appear in the console.