loading...

I started learning Java

buzzedison profile image Edison Ade ・1 min read

I downloaded Java here:

And then i am using Intellij IDE from Jetbrains.
Download here

I wrote my first Java program 2 days ago. I am doing this with the #100DaysOfCode on Twitter. To track my progress.

What i have learnt so far.

  • Every Java program must have at least one function.
  • The functions don’t exist on their own. It must always belong to a class.
  • A class is a container for related functions.
  • Every Java program must have at least one Class that holds the main function
  • Then we need Access modifiers in Java.

What are access modifiers?
They help set boundaries to the scope of a class, constructor , variable, or method.

For my first Java program. I will only be interested in the "Public" access modifier.

package com.codewitedison;

public class Main {

    public static void main(String[] args) {
System.out.println("Welcome to my first Java Program);
    }
}

Intellij makes it really easy. So it came with the Java boilerplate that set the public class main and the public static void main lines. I only added the System.out.println and print message. System.out is a way to print results to the terminal.

Posted on by:

buzzedison profile

Edison Ade

@buzzedison

I like doing, helping people do, getting things done. founder. http://codewit.co . directorat http://loudspeakerdigital.com lead. http://bloopglobal.com , http://agriprohub.com , souledoutlive.

Discussion

pic
Editor guide