Results 1 to 4 of 4
Thread: system.out.prinln
- 06-19-2008, 01:28 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 11
- Rep Power
- 0
- 06-19-2008, 01:32 PM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You want to implement your own class and static method to do the process in that class. Try and see.
- 06-19-2008, 07:56 PM #3
Class atributes
Hello haiforhussain
Define your class to have a null referenced object as a static attribute and have the class of that attribute implement a static method. For example:
AndJava Code:public class ClassOne{ public static ClassTwo two = null; }
Then the following could be done:Java Code:public class ClassTwo{ public static void doSomething(){ System.out.println("In the past I was a grasshopper. But now, I am the master!"); } }
This could be nice if you want to build a toolbox, i.e., you don't want to add objects to your project, but structured functionality. Personally, I have never found a need for this though. :)Java Code:public static void main(String[] arg){ ClassOne.two.doSomething(); }
Good luck ;)Eyes dwelling into the past are blind to what lies in the future. Step carefully.
- 06-20-2008, 06:48 AM #4
Member
- Join Date
- Jun 2008
- Posts
- 11
- Rep Power
- 0
Similar Threads
-
Point System
By Zosden in forum Suggestions & FeedbackReplies: 2Last Post: 02-14-2009, 12:45 PM -
Getting System Properties
By Java Tip in forum Java TipReplies: 0Last Post: 11-19-2007, 05:00 PM -
system information
By nitinborge5 in forum New To JavaReplies: 1Last Post: 08-07-2007, 09:25 AM -
where is the system.property
By osval in forum Advanced JavaReplies: 2Last Post: 08-06-2007, 03:54 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks