-
Java Deadlock
How to avoid deadlock in Java?
-
Static Import
What is a static import? Why it is required?
-
Sizeofthe Variable
How to find the size of the (datatype) variable in java?in c we use sizeof() operator for for finding size of data type
-
Exception handling catch block?
Please observe the following code....public class MyClass{ public static void main(String[] args) { try{ //code here }catch(Exception e) { System.out.println(e); } }}if the try block throws an ArithmeticException,NullPointerException,etc....we can handle the exception...Because those are the sub classes of Exception class...The Question...
-
Implementing Pagination
How we implement pagination in j2ee
-
-
What is output of the following Java program?
i want output of this program:
javaimport javax.mail.*;
import javax.mail.internet.*;
import java.util.*;
public class Assimilator
{
public static void main(String[] args)
{
try
{
Properties props = new Properties();
props.put("mail.hosst", "mail.Pmc Tech.org");
Session mailConnection=Session.hetInstance(props,... -
Why compiler does not provide default constructor ?
Why compiler does not provide default constructor if there is any parametrized constructor is provided by programmer.?
-
How to find size of string in java
How to know that a string require how much bytes in memory......
Ex. String s="abc";
String s=new String("abc");
How much memory is used for s and s2 -
Java valueOf( ) method
What is the use of valueOf( ) method?
-
Java object variable and class variable
What is the difference between object variable and class variable..?
-
instanceOf operator
what is difference between instanceOf operator and getclass()
-
Advantage of java
What is the main advantage of java when compared to other programing languages...?
-
-
Can a reference variable of Interface calls and equals method of Object call? If so, why?
javainterface X{
void m1();
void m2();
}
class Child2 extends Object implements X {
public void m1(){
System.out.println("Child2 M1");
}
public void m2(){
System.out.println("Child2 M2");
}
}
public class ParentChildInfterfaceDemo {
public static void main(String[] args){
X... -
-
Explain the mechanism to create an object.
In Java, a class is a type, similar to the built-in types int and boolean. Declaring a variable does not create an object. Explain the mechanism to create an object.
-
-
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. -
Java Interview Questions
Ans