1Z0-805 Exam Questions
95 real 1Z0-805 exam questions with expert-verified answers and explanations. Page 2 of 2.
- Question #51
Given the code format: SimpleDateFormat sdf; Which code statements will display the full text month name?
- Question #52
The default file system includes a logFiles directory that contains the following files: log_Jan2009 log_01_2010 log_Feb2010 log_Feb2011 log-sum-2012 How many files the matcher in...
- Question #53
Given the code fragment: SimpleDateFormat sdf; Which code fragment displays the two-digit month number?
- Question #54
Which three enum constants are defined in FilevisitResult?
- Question #55
Given the code fragment: public void processFile() throws IOException, ClassNotFoundException { try (FileReader fr = new FileReader ("logfilesrc.txt"); FileWriter fw = new FileWrit...
- Question #56
Given the following incorrect program: class MyTask extends RecursiveTask<Integer> { final int low; final int high; static final int THRESHOLD = /* . . . */ MyTask (int low, int hi...
- Question #57
Given: private static void copyContents() { try ( InputStream fis = new FileInputStream("report1.txt"); OutputStream fos = new FileOutputStream("consolidate.txt"); ) { byte[] buf =...
- Question #58
How many Threads are created when passing tasks to an Executor Instance?
- Question #59
Consider the following database table: Inventory Table * Item_ID, Integer: PK * Item_name, Varchar (20) * Price, Numeric (10, 2) * Quan, Integer Consider the following method that...
- Question #60
Which is a key aspect of composition?
- Question #61
Given: What two changes should you make to apply the DAO pattern to this class?
- Question #62
Which two descriptions are benefits of using PreparedStatement objects over static SQL in JDBC?
- Question #63
Given the code fragment: /* method declaration */ { try { String className = "java.lang.String"; String fieldname = "somefield"; Class c = Class.forName(className); Field f = c.get...
- Question #64
You have been asked to create a ResourceBundle file to localize an application. Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?
- Question #65
Given: class Fibonacci extends RecursiveTask<Integer> { final int n; Oracle 1Z0-805 Exam Fibonacci (int n) { this.n = n } Integer compute () { if (n <= 1) return n; Fibonacci f1 =...
- Question #66
Given the incomplete pseudo-code for a fork/join framework applications: submit (Data) { if (Data.size < SMALL_ENOUGH) { _________(Data); // line X } else { List<Data> x = ________...
- Question #67
The current working directory is named finance. Which two code fragments allow you to write the salary.dat file if it does not exist under "finance\payroll"?
- Question #68
Which statement is true about the DSYNC constant defined in standardopenoptions enums?
- Question #69
Given the following code fragment: public static void getInfo() { //insert code here List fontCatalog = new ArrayList(); fontCatalog.add("Algerian"); fontCatalog.add("Cambria"); fo...
- Question #70
What is the minimum SQL standard that a JDBC API implementation must support?
- Question #71
Which two fragments can be combined into a statement that returns an ExecuteService instance?
- Question #72
Given the code fragment: public class App { public static void main (String [] args) { path path = paths.get("C\\educations\\institute\\student\\report.txt"); system.out.printIn("g...
- Question #73
Given this code fragment: try { String query = "SELECT * FROM Item"; Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery(query); ResultSetMetaData rsmd = rs.g...
- Question #74
In the Java SE7 API, which method is most commonly used by factories to instantiate objects? Oracle 1Z0-805 Exam
- Question #75
Which method or methods should you implement to create your own implementation of the java.nio.file.PathMatcher interface?
- Question #76
Given: public class MyGrades { private final List<Integer> myGrades = new ArrayList<Integer>(); private final ReadWriteLock rwlock = new ReentrantReadWriteLock(); public void addGr...
- Question #77
Given: public class StringApp { public static void main(String[] args) { String[] str="Java SE,java EE,Java ME,java FX".split(","); int count=0; for(int i=0;i<str.length;i++) { swi...
- Question #78
Which two file attribute views support reading or updating the owner of a file?
- Question #79
Which two code blocks correctly initialize a Locale variable?
- Question #80
Oracle 1Z0-805 Exam The two methods of course rescue that aggregate the features located in multiple classes are __________.
- Question #81
Given: public class DAOManager { public AccountDAO getAccountDAO() { return new AccountJDBCDAO(); } } Which design pattern best describes the class?
- Question #82
Which two scenarios throw FileSystemNotFoundException when the paths.get(URI) method is invoked?
- Question #83
Which code fragment is required to load a JDBC 3.0 driver?
- Question #84
What statement is true about thread starvation?
- Question #85
Given the code fragment: static void addContent () throws Exception { Path path = Paths.get("D:\\company\\report.txt"); UserPrincipal owner = path.getFileSystem().getUserPrincipalL...
- Question #86
Which two statements are true?
- Question #87
Which five items are provided by the Java concurrency utilities?
- Question #88
Given: import java.io.*; public class SampleClass { public static void main(String[] args) throws IOException { try { String dirName = args[0]; File dir = new File(dirName); File.c...
- Question #89
Given a language code of fr and a country code of FR, while file name represents a resource bundle file name that is not the default?
- Question #90
Given: Person public Person(int id) public int getid() public String getContactDetails() public void setContactDetails(String contactDetails) public String getName() public void se...
- Question #91
Which code fragment demonstrates the proper way to handle JDBC resources? Oracle 1Z0-805 Exam
- Question #92
Given: import java.io.IOException; import java.io.file.Path; import java.io.file.Paths; public class Path12 { public static void main(String s[]) throws IOException { Path path = P...
- Question #93
Given the fragment: public class CustomerApplication { public static void main (String args[]) { CustomerDAO custDao= new CustomerDAOMemoryImpl(); // Line 3 // ... other methods }...
- Question #94
Given this error message when running your application: Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name MessageBundle, locale And giv...
- Question #95
Given the interface: Public interface Idgenerator { Oracle 1Z0-805 Exam int getNextId(); } Which class implements IdGenerator in a thread-safe manner, so that no threads can get a...