Oracle 1Z0-804
Get real exam questions for 1Z0-804 Java SE 7 Programmer II Exam. 100% Free.
1Z0-804 Premium VCE File
Learn More
100% Pass Guarantee - Dumps Verified - Instant Download
150 Lectures, 20 Hours
Q1. Given: What is the result? A. Daniel B. Unknown C. It may print"unknown"or"Daniel"depending on the JVM implementation. D. Compilation fails. E. An exception is thrown at runtime. View AnswerAnswer: D Explanation: The compilation fails at line start(); Erstellen eines statischen Verweises auf die nicht statische Methode start() vom Typ Runner nicht m.glich.Exception in thread "main"
Q1. Give: Which is correct? A. Employee takes advantage of composition. B. Employee "has-an" Email. C. Employee "is-a" LetterPrinter. D. Employee has low cohesion. View AnswerAnswer: D Explanation: The relationship between Employee and e-mail is poorly implemented here. There is low cohesion. Note: Low cohesion is associated with undesirable traits such as being difficult to maintain,Â
Q1. Which statement creates a low overhead, low-contention random number generator that is isolated to thread togenerate a random number between 1 and 100? A. int i = ThreadLocalRandom.current().nextInt(1, 101); B. int i = ThreadSafeRandom.current().nextInt(1, 101); C. int i = (int) Math.random()*100+1; D. int i = (int) Math.random(1, 101); E. int i = new random().nextInt(100)+1; View Answe
Q1. Given the code format: SimpleDateFormat sdf; Which code statements will display the full text month name? A. sdf = new SimpleDateFormat ("mm", Locale.UK); System.out.println("Result:", sdf.format(new date())); B. sdf = new SimpleDateFormat ("MM", Locale.UK); System.out.println("Result:", sdf.format(new date())); C. sdf = new SimpleDateFormat ("MMM", Locale.UK); System.out.println("Result
Q1. Given the code fragment: What is the result? A. Java 7 B. Java 6 C. Java 7, Java 6 D. Java 7 java 6 E. Java View AnswerAnswer: C Explanation: regex: Java / one or more anything !!! / ends with a digit so it is the source string Q2. Given: What is the result? A. Cue sports, Cue sports B. Compilation fails at line 9 C. Compilation fails at line 11 D. Compilation fails at line 1
Q1. Given the fragment: If thread a and thread b are running, but not completing, which two could be occurring? A. livelock B. deadlock C. starvation D. loose coupling E. cohesion View AnswerAnswer: A,B Explanation: A: A thread often acts in response to the action of another thread. If the other thread's action is also a responseto the action of another thread, then livelock may res
Q1. Given: What is the result? A. Null B. class java.lang.ArraylndexOutOfBoundsException C. class java.lang.NullPointerException D. class java.lang.Exception E. Compilation fails. View AnswerAnswer: E Explanation: error: incompatible types e = new Exception(); required: RuntimeException found: Exception Q2. Given: What is the result? A. peach orange apple B. peach orange C. apple o