Método devuelve el valor


class HelloWorld {
    public static void main(String[] args) {
 System.out.print(num());

    }
    
    
    
 static int num()
 {
     return 123;
 }
    
    
}
Javasper