-
Serialization Process
Explain the use of serialization process in real time projects?
-
Find the Output
class A{ public static void main(String[] a){ System.out.print(String.valueOf(1)+String.valueOf(2)); String s1="s1"; String s2=s1.toString(); System.out.print(","+(s1==s2)); }}
-
Marker Interface
When there is no methods in the marker interface, then what is the use of marker interface. What is the functionality of the interface. Why do we need to implement marker interface?
-
Java Collection
What is the default capacity and load factor in Java Collection? Explain its role.
-
Double Value
What happens when you add a double value to a String?
-
Nested and Inner Classes
What is the need of nested and inner classes in Java? Explain where they are useful?
-
Java Program to Count Number of Files
50,000 HTML files are in a folder on a windows machine. Among them, content of some files(not the file names) contain the sentence "SocioMaC-Jus' Follow!". Write a Java program to count the number of such files.
-
Jumble Array Values
An array A is of size N. Write a java method that jumbles all values in the array. All possible permutations must be possible and chances for each possible permutation must be equal. For example, size of array A is 3. A[0]=x, A[1]=y, A[2] =z.Possible permutations are 3! After jumbling elements, there would be equal chances for each of xyz,yxz,... to be in the array elements.
-
Read Number Methods
How many methods to read numbers and characters and what should be used.
-
static data member
what is the use of static data member?
-
Usage of Abstract class and Interfaces
In Real time when we go for Abstract classes and when we go for Interfaces
-
Null keyword
Is null a keyword? if not what is it?
-
Access Specifier
What will happen if same access specifier repeats more than once within a class?
-
Exception Handling
What is the output of the following program, When tested under JDK 5.0class ExceptionDemo{ public static void main(String[] args) { int a[] = new int[] {1,2,3,4,5}; try{ System.out.prinltln(a[6]); } catch(Exception e) { System.out.println("Catching Exception ..."); } catch(ArrayIndexOutofBoundsException ae) { System.out.println("Catching ArrayIndexOutOfBounds...
-
What is the Output of the following Java Program
public interface I1{Static String x="inside I1";public void someMethod();}class A implements I1{ public static void main(String args[[]){ System.out.println("Calling I1 var ..."+I1.x);}}
-
Implement Interface using Polymorphism
How an interface can be implemented using polymorphism?Why multiple inheritence is not used in Java?
-
Restrict a Class
How can we restrict a class so that no instance creation of class possible without declaring the class as Abstract ?
-
-
-
-
Transient and Volatile.
What is the difference between Transient and Volatile. Does volatile variable is serialized and synchronised.
-
-
-
what is the difference between instance,object,refference,class.
give the answer
-
-
-
-
-