Results 1 to 1 of 1
Thread: Static methods
-
Static methods
In Java, methods can be static. Static methods can be called without an object reference. Static methods can not use instance variables. They can use local or class variable (static).
Java Code:public static void showAll(){ // name and age should be static System.out.println("Name: " + name); System.out.println("Age: " + age); }
Similar Threads
-
Abstract Class with Static Methods
By bugger in forum New To JavaReplies: 7Last Post: 09-05-2008, 12:20 AM -
Newbie question about Static methods
By SCS17 in forum New To JavaReplies: 9Last Post: 02-06-2008, 08:03 AM -
Static methods - not working
By Echilon in forum New To JavaReplies: 2Last Post: 12-21-2007, 01:31 PM -
Why methods in an interface cannot be static?
By cbalu in forum Advanced JavaReplies: 2Last Post: 12-12-2007, 07:57 PM -
significance of static variables and methods
By imran_khan in forum New To JavaReplies: 4Last Post: 08-02-2007, 09:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks