Posts

Showing posts with the label OCFA

Java Certified Foundations Associate (1Z0-811) Free Practice Tests

Image
  The answers to the questions below are waiting for you at the end of this blog. Keep reading to discover them! 1. Which of the following is true about Java bytecode? A. It can only be executed on the machine where it was compiled. B. It can be executed on any platform that has a compatible Java Virtual Machine (JVM). C. It can be executed on any operating system but only on specific hardware architectures. D. It needs to be compiled separately for each operating system and hardware architecture to run properly. 2. Given the following code: //1 //2 public class ExampleClass { public static void main ( String[] args ) { String message = "Hello, World!" ; System. out .println(message); } } Which two lines can be inserted at locations marked //1 and //2 ? A. import java.util.*; at //1 B. import java.lang.*; at //1 C. package example; at //1 D. package com.example; at //2 E. import java.lang.*; at //2 F. import java.util.*; at //2 3. Which ...