SCJP (Sun Certified Programmer for the Java 2 Platform) tutorials: Page 7

Home arrow Java Tutorials arrow SCJP(310-035) arrow SCJP (Sun Certified Programmer for the Java 2 Platform) tutorials
SCJP (Sun Certified Programmer for the Java 2 Platform) tutorials Print E-mail
User Rating: / 32
PoorBest 
Contributed by Joe   
Friday, 07 July 2006

Given:


1. public class Test {
2. public static void main (String [] args)  {
3. string foo = “blue”;
4. string bar = foo;
5. foo = “green”;
6. System.out.printIn(bar);
7.    }
8. }

What is the result?

A. An exception is thrown.
B. The code will not compile.
C. The program prints “null”
D. The program prints “blue”
E. The program prints “green”

 Which can be used to decode charS for output?

A. Java.io.InputStream.
B. Java.io.EncodedReader.
C. Java.io.InputStreamReader.
D. Java.io.InputStreamWriter.
E. Java.io.BufferedInputStream.

Related Articles:

Exam Objectives of Java Collections Framework  for Sun Certified Programmer for Java 2 Platform 1.4 (CX-310-035)

Nested Classes and Static Nested Classes of Java 2™ Programmer Exam Cram™ 2 (Exam CX-310-035)



Last Updated ( Monday, 17 July 2006 )

  home              contact us

 

©2006-2009 DeveloperZone.biz   All rights reserved     powered by Mambo Designed by Siteground