Imagine having hundreds of java classes. In these classes there are many System.out.println(data) in different places. When printing in the console screen I cannot know which java class is printing. Of course I could open every java-file and in every System.out.println() write as:
System.out.println("This is TheNameOfJavaClass" + myData)
or
System.out.println(this.getClass().getName() + " - " + myData)
...but I want a nice approach like extending or implenting some how in classes and the java classes add java-class-name when using System.out.println(myData) it becomes className + myData
Do you have any suggestion? Is there clever approach to this?
Edited by: Maria1990 on Aug 12, 2010 12:32 PM