- 1

What function has got object?

17th Oct 2016, 6:27 PM
Samuel Shakespeare
Samuel Shakespeare - avatar
3 Respuestas
0
main function
18th Oct 2016, 12:58 AM
gol_roger
gol_roger - avatar
0
Can u be more clear ?
18th Oct 2016, 12:58 AM
gol_roger
gol_roger - avatar
0
All non static functions(methods) of an class can be accessed only using objects. so we can say non static function(methods) have objects. ex: public class abc { int x=15; public void display() { System.out.println("hello"); } } public class mainclass { public static void main (string[] args) { abc a1= new abc(); System.out.println(a1.x); System.out.println(a1.display()); } } output: 15 hello
18th Oct 2016, 6:11 PM
Sandhya.Hanchate