class Test { int one = 10; int two = 20; int result; public int getOne() { return one; } public int getTwo() { return two; } public int getResult() { result = getOne() * getTwo(); return result; } } class mainTest { public static void main (String args[]) { Test object = new Test(); System.out.println(object.getResult()); } }