-
-
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. -
-
How SCJP exams are Helpful???
I am new to java...if I passed out the SCJP exams then how it would be beneficial at time of job..interviews???
-
Use of abstract class and interface
What is the exact use of abstract class and interface?
-
Polymorphism
Explain polymorphism to your 7 year old nephew.
-
Python programming
How do i write a module to keep count of the amount of guesses it takes to guess the number correctly?
-
Select appropriate answers for the incomplete declaration listed below?
class A ______ B ______ C { } // line 4
a) The 1st blank should be extends and the 2nd blank should be implements.
b) The 1st blank should be implements and the 2nd blank should be extends.
c) B is a class and C is an interface
d) B and C can be either class or interface depending upon the placement of extends or implements in the 1st or 2nd blank.
Java Interview Questions
Ans