2024 Oracle Official New Released 1Z0-809 Q&As
100% Free Download! 100% Pass Guaranteed!
https://www.certleader.com/1Z0-809-dumps.html
Q1. Which two statements are true for a two-dimensional array of primitive data type? A. It cannot contain elements of different types. B. The length of each dimension must be the same. C. At the declaration time, the number of elements of the array in each dimension must be specified. D. All methods of the class object may be invoked on the two-dimensional array. View AnswerAnswer: C,D Ex
Q1. A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the results? A. Compilation fails. B. The third argument is given the value null. C. The third argument is given the value void. D. The third argument is given the value zero. E. The third argument is given the appropriate falsy value for its declared type. F) An exception occ
Q1. Given the code fragment: Path source = Paths.get (“/data/december/log.txt”); Path destination = Paths.get(“/data”); Files.copy (source, destination); and assuming that the file /data/december/log.txt is accessible and contains: 10-Dec-2014 – Executed successfully What is the result? A. A file with the name log.txt is created in the /data directory and the content of the /data
Q1. Given the code fragment: List<Integer> nums = Arrays.asList (10, 20, 8): System.out.println ( //line n1 ); Which code fragment must be inserted at line n1 to enable the code to print the maximum number in the nums list? A. nums.stream().max(Comparator.comparing(a -> a)).get() B. nums.stream().max(Integer : : max).get() C. nums.stream().max() D. nums.stream().map(a -> a).m
Q1. The data.doc, data.txt and data.xml files are accessible and contain text. Given the code fragment: Stream<Path> paths = Stream.of (Paths. get(“data.doc”), Paths. get(“data.txt”), Paths. get(“data.xml”)); paths.filter(s-> s.toString().endWith(“txt”)).forEach( s -> { try { Files.readAllLines(s) .stream() .forEach(System.out::println); //line n1 } catch (I
Q1. Given the code fragment: LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14); LocalDate nextYear = valentinesDay.plusYears(1); nextYear.plusDays(15); //line n1 System.out.println(nextYear); What is the result? A. 2021-02-14 B. A DateTimeException is thrown. C. 2021-02-29 D. A compilation error occurs at line n1. View AnswerAnswer: B Q2. Given: What is the result? A.
Q1. Given the class definitions: And the code fragment of the main() method, What is the result? A. Java Java Java B. Java Jeve va C. Java Jeve ve D. Compilation fails View AnswerAnswer: D Q2. Given: class Vehicle { int vno; String name; public Vehicle (int vno, String name) { this.vno = vno,; this.name = name; } public String toString () { return vno + “:” + name; } } a
Q1. public class StringReplace { public static void main(String[] args) { String message = "Hi everyone!"; System.out.println("message = " + message.replace("e", "X")); } } What is the result? A. message = Hi everyone! B. message = Hi XvXryonX! C. A compile time error is produced. D. A runtime error is produced. E. message = F. message = Hi Xveryone! View AnswerAnswer: B Q2. Given