FileStore is new class introduced in Java 7.0. It is part of java.nio package. This class helps in geting the type of storage for the files stored whether it’s a device, partition or concreate file system. Also this class defines the list of methods which is useful for getting information about the file storage such …
OCPJP 6 Mock Exam – 21
1 . Given: Which two construct an anonymous inner class? Choose the two below: AnAdapter1 aa = new AnAdapter1 () {} AnAdapter0 aa = new AnAdapter0 () {} AnAdapter0 aa = new AnAdapter0 (5) {} AnAdapter1 aa = new AnAdapter1 (5) {} AnInterface ai = new Anlnterface (5)) { 2 . What will be the …
OCPJP 6 Mock Exam – 20
1 . Which of the following are valid array construction? int a[] = new int[]; int a[] = new int[10]; int a[10] = new int[]; int a[] = new a[10]; 2 . Which of the following are valid array initialization? new int[] = {1,2,3,4}; new int[10] = {1,2,3,4}; new int[] = 1,2,3,4; new int[] = …
How To Convert String To Byte In Java?
This tutorial highlights the simple example to demonstrates how to convert a string object to the byte stream. We can simply use the getBytes() method in the string object to convert the string to bytes array. Lets look at the example program. Output
How To Convert Char To String In Java?
This post highlights a simple example to demonstrates how to convert a char datatype to a string object. Lets look at the example program. Output
How To Debug JSP Page?
Java EE Tutorials JSP Tutorials Recommended Books for Java Server Pages (JSP) Debugging enables a developer to detect and identifies the errors in the application. But testing a JSP/Servlet compared to other programs is often found to be difficult. Following are some of the suggestions which can be used to test you JSP programs: Using …
OCPJP 6 Mock Exam -18
1 . What will be the output? Choose the one below: Base(){} Base(long l){} Base(float f){} It will compile properly 2 . What will be the output? Choose the one below: 2 4 Compiler Error It will compile if we add super(2) in Test2() 3 . which of the following keywords can be applied to …
How To Convert String To Char Array In Java?
This tutorial is simple example for converting a string object into a simple character array. Lets look at the example. Output…