Skip to content
 
 

Repository files navigation

Java Basic Lab

Learning Goals

  • Create your own class and make it output a "Hello world" message.

Introduction

You should create a class with a static method that prints the "Hello world" message. There's already a Main.java file with a Main class as an example in this repo's source folder. Feel free to go through it if you're stuck.

Instructions

  • Your class must be saved in a file that has the same name as your class. For example, SampleClass must saved in a file named SampleClass.java
  • Your class must have a public static void main(String[] args) method in order to be runnable from the command line
  • You will compile your class with the javac command on the command line, e.g. javac SampleClass.java
  • You will then run your class with the java command on the command line, e.g. java SampleClass
  • The instruction to print text on the screen is System.out.println("message here");

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages