How To Convert Char To String In Java?

java-thumbnail

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-thumbnail

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 -19

ocpjp-6-thumbnail

1 . What will be the output? Choose the one below: 10 0 Nothing is printed Compiler error 2 . which of the following modifiers are applied to the nested classes class? private protected public static All the above 3 . which of the following modifiers are applied to the top level classes? static private […]

OCPJP 6 Mock Exam -18

ocpjp-6-thumbnail

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 […]

OCPJP 6 Mock Exam -17

ocpjp-6-thumbnail

1 . Given: Which of the following constructor signatures MUST exist in the Demo class for Derived to compile correctly? public Demo(int a, int b) public Demo(int c) public Demo() 2 . Which of the following class declarations for a normal top level class are incorrect? public synchronized class Base extends Thread private protected class […]

How To Convert String To Char Array In Java?

java-thumbnail

This tutorial is simple example for converting a string object into a simple character array. Lets look at the example. Output…  

How To Convert Char Array To String In Java?

java-thumbnail

This tutorial is simple example for converting a character array into a simple string object. In general, there are two ways to convert the character array to string object, First approach is to pass the array into the string constructor and second approach is to using the String.valueOf(). Lets look at the example. Output…

StringTokenizer Example

java-thumbnail

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

java-thumbnail

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 […]

Auto Refresh a Web Page In JSP

java-ee-thumbnail

Java EE Tutorials JSP Tutorials Recommended Books for Java Server Pages (JSP) Instead of refreshing the web page all the time, JSP includes such a code in which refreshing is done automatically in the web page. setIntHeader method of response object (HttpServletResponse) can be used for refreshing the page. Signature of this method setIntHeader is […]