ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
printstream class method println() is calling using System
class and its static object out .how it is explain any one
in detail with example ?
 Question Submitted By :: T.manohar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: printstream class method println() is calling using System class and its static object out .how it is explain any one in detail with example ?
Answer
# 1
import java.io.*;
 class Other
{
public static PrintStream wise;
static
{
try{
wise=new PrintStream(new FileOutputStream("abc.txt"));
}
catch(Exception e)
{

}
}

}
public class AB
{
public static void main(String arg[])
{
Other.wise.println("hi");
}
}
This will print hi on a file abc.txt
some thing like this is written in class System. A static 
object out of PrintStream Class is defined in static block 
and connected to a Stream Connected to Console.So everythin 
that we write with in print()method comes out as output
 
Is This Answer Correct ?    5 Yes 1 No
Chandan Kumar
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How to sort the elements in HashMap Ness-Technologies3
what is the Use of throws exception?  2
Difference between JDK, JRE, JVM Oracle5
define System.out.println(); what is the meaning!  8
Difference between the paint() and repaint() methods?  1
Which class has no duplicate elements?  8
Can we inherit the constructor in a Class?please give one example. iGate3
How to convert a string to long?  2
When finally clause is executed?  3
which class to use when concatenating strings in a loop. IBM2
can we Connect Applet to Data Base ? with Discriptiom. and also What is Diff. from Applet & Servlet? Systematix1
Name two subclasses of the TextComponent class?  2
How are Java source code files named?  3
can anyone explain me the concept of autoboxing?  3
What is Ideal Design of Class?  2
Name the class that used to read objects directly from a stream? Wipro2
How to create two different thread class inside a main function?  1
How do you load an HTML page from an Applet ?  2
what is features of jdk 1.5? TCS2
what is multitherading Tech-Mahindra2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com