Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to call a function in java

public class MyClass {
 
    static void myMethod() {
        System.out.println("You have called me! My name is: myMethod!");
    }
 
    public static void main(String[] args) {
        myMethod();
    }
}
Comment

java function

import.java.io.BufferedReader;

public static String IN() {
        java.io.BufferedReader d = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
        String str = "";
        try {
            str = d.readLine();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return str;
    }
Comment

Calling a Method in Java

// calls the method
addNumbers();
Comment

PREVIOUS NEXT
Code Example
Java :: export JAVA_HOME=` mac 
Java :: how to add spaces before string in java 
Java :: import java.lang.Math.*; 
Java :: mac java version terminal 
Java :: keytool error: java.lang.Exception: Key pair not generated, alias <demo already exists 
Java :: how to run java in eclipse 
Java :: Conversion from Java List to Array 
Java :: arraylist index java 
Java :: bubble sort in java 
Java :: binary to int java 
Java :: Create class from string variable JAVA 
Java :: how to set context path in spring boot 
Java :: java create file 
Java :: primefaces download file 
Java :: from file to array java 
Java :: java system.out.println not working 
Java :: java get class name of object 
Java :: settext java 
Java :: local date to date java 
Java :: java set 
Java :: print all numbers from 1 to n java 
Java :: how to draw a triangle in java 
Java :: initialize arraylist java with size 
Java :: java string equal 
Java :: Java Create a BufferedOutputStream 
Java :: text field mouse event java 
Java :: frame background changing in java 
Java :: java grösser gleich 
Java :: keep jframe on top 
Java :: how to convert integer to string in java 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =