Java Tutorial for Beginners | Learn Java in Kannada


 
Java Tutorial for Beginners | Learn Java in Kannada 

  1. Sample Code


Functions


A function is a block of code which takes some input, performs some operations and returns some output. 

The functions stored inside classes are called methods.


The function we have used is called main.


Class


A class is a group of objects which have common properties. A class can have some properties and functions (called methods).

The class we have used is Main.


  1. Our 1st Program

Online java code compiler

https://www.jdoodle.com/online-java-compiler/


package com.apnacollege;


public class Main {


   public static void main(String[] args) {

  // Our 1st Program

       System.out.println("Hello World");

   }

}



0 Comments