Give a sample code for print method in Java


(Marie) #1

I’m looking for a simple sample code for Java using print method.


(Kim) #2
public static void Println(){
    System.out.println("Hello World");
}
public static void main (String[] args){
    System.out.println("Sample Print Method:");
    Printline();
    System.out.println("End");
}

This is a basic hello world code, Hope this helps you!