-
What is the range of the char type
The range of the char type is 0 to 2^16 - 1.
-
Java Persistance API
What is JPA, can we use JPA without hibernate (hibernate3.jar)? Explain with samples?
-
What happens when you add a double value to a String
The result is a String object.
-
What is the value of 111 % 13?
A) 3B) 5C) 7D) 9
-
-
-
Predict the output of the given code:
javapublic class Test {
private static String msg = "HCL ";
static{
Thread t = new Thread(new Runnable(){
public void run(){
msg = "Technologies ";
}
});
t.start();
}
public static void main(String[] args){
System.out.print(msg);
}}
a) Compiles and prints HCL
b) Compiles and prints Technologies
c) Compiles and... -
What is the preferred size of a component
The preferred size of a component is the minimum component size that will allow thecomponent to display normally.
-
Which characters may be used as the second character of an identifier,but not as the first character of an identifier
The digits 0 through 9 may not be used as the first character of an identifier but they maybe used after the first character of an identifier.
-
-
-
Java code to set column width in CSV file
Can someone help on how to set the column width in CSV file using javacode.
I have used FileWriter class to upload data into the csv file. Results are getting populated properly but csv file showing results with default column width. Is there a way we can set the width of the column dynamically based on result length or set fixed length?
-
JUnit
What is JUnit and how it is used?
-
Python programming
How do i write a module to keep count of the amount of guesses it takes to guess the number correctly?
-
-
In order for a source code file, containing the public class Test, to successfully compile, which of the following must be true?
A) It must have a package statementB) It must be named Test.javaC) It must import java.langD) It must declare a public class named Test
-
-
What is the difference between the >> and >>> operators
The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that havebeen shifted out.
-
Why Bind variables will be deleted when you restart the server. Can you change this scenario.
I am trying to develop a small application. In this i have provided registration and login form. Username and password are stored in the JNDI server. This application is working fine. but when i am restarting the server, all the bind variables are deleting. why? i want to store them permanently. can you provide me the solution.
Thanks in advance. -
What is the legal range of a byte integral type?
A) 0 - 65, 535B) (-128) - 127C) (-32,768) - 32,767D) (-256) - 255
Java Interview Questions
Ans