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…
StringTokenizer Example
StringTokenizer in java.util package is very useful for spliting the length string into the pieces. You can pass a delimeter to the StringTokenizer constructor to split the string where ever that delimeter appeared in the string. If you have not passed any delimeter, by default it splits the string using the empty space in the …
Compressing and Uncompressing File Example in Java
Compressing and Uncompressing of the files is one of the common utility we use in our daily life. If you are using windows, using WinZip is very common to compress the files and sent to others. The advantage of compressing the files is to save the memory occupied for the file in the disk. It …
OCPJP 6 Mock Exam -16
1 . What will be the output? Choose the one below: Compile time error at line 10 Compilation and output of 123 Compilation and output of the digits “1”, “2” and “3”, but the order can’t be determined Compilation and output of onetwothree Compilation but runtime error at line 10 2 . The following is …