//import java io.*; //javac Test_this.java public class Test_this { public static void main(String args[])//this is an netry function must have { int f10 = 5; int n1=10; System.out.println(f10 + n1 + "hello world"); //to track another method //class-name cc = new class-name(); Test_this m5= new Test_this();// creating object from a class m5.method1();//calling a method via an object baba m6= new baba(); m6.method2(); } public void method1() // this how you define a method { //method body starts here //a function needs a body to do something double j2 = 12.2; System.out.println(j2); }//method's bosdy ends here }//main clas ends here class baba { public void method2() { System.out.println(" new mthod"); } }