How to Simulate System.out.println() ?
// Class A Will Work like PrintStream Class
class A
{
// printp Function will replace println()
public void printp()
{
System.out.println("Testing");
}
}
// Class B Will Work like System Class
class B
{
//Here a is like out
public static A a=new A();
}
class C
{
public static void main(String args[])
{
// System.out.println();
// System.out.println();
B.a.printp();
}
}
Watch Following Video to Learn in Detail :
Watch Following Video to Learn in Detail :
SUPER
ReplyDelete