Class HelloWorld

java.lang.Object
topics.foundation.helloworld.HelloWorld

public class HelloWorld extends Object

Hello World

The classic first program. Demonstrates the minimal structure of a Java class: a method that takes parameters, performs a simple operation, and returns a result.

Author:
vicegd
  • Constructor Details

    • HelloWorld

      public HelloWorld()
  • Method Details

    • sum

      public int sum(int a, int b)
      Returns the sum of two integers.
      Parameters:
      a - First integer.
      b - Second integer.
      Returns:
      a + b