Constructor in interface ?

interface+constructor

Can we write constructor inside interface in java? No. Interfaces does not allow constructors. Why interface does not have constructor? The variables inside interfaces are static final variables... read more ?

Can we create private constructor in java

private+constructor

1.Can a constructor in Java be private? Yes we can declare private constructor in java. If we declare constructor as private we can not able to create object... read more ?

Java Static Constructor : is it possible to create static constructor?

static+constructor+in+java+updated

1.Is it possible to create static constructor in java? No. We can not create constructor with static. If we try to create a static constructor compile time error... read more ?

How to check internet connection using java

internetconnection

Hi friends now we are going to check our pc is having internet connection or not using java code  yes we can check internet connection using java code... read more ?

Top 10 Interview Programs and questions on method overriding in java

method+overriding

1.What is method overriding in java? Defining multiple methods with same name and same signature in super class and sub class known as method overriding.  Method overriding is... read more ?

Top 15 Java abstract class and abstract method interview questions and programs

abstract+static+errr

1.What is abstract class in java? Hiding the implementation  and showing the function definition to the user. Abstract class contains abstract methods and concrete methods(normal methods) 2.How can... read more ?

Can we call super class static method from subclass in java

static+in+java

If you want to call static method of a class we can call directly from another static method or by using its class name we can call static... read more ?

Inheritance interview programming questions : Part 2

1. what is the output of following program: package com.instanceofjava;   public class SuperDemo{ public void show(){     System.out.println("Super class show() method called");   }   }... read more ?

Constructor chaining in java using this and super Keywords

Constructor chaining example program in same class using this keyword. package instanceofjava; class ConstructorChaining{ int a,b  ConstructorChaining(){ this(1,2);  System.out.println("Default constructor");   }    ConstructorChaining(int x , int y){... read more ?

Java Coding Interview programming Questions : Java Test on HashMap

1.What will be the Output of this program. public class HashMapJavaTricky{   public static void main(String[] args) {       HashMap<Integer,String> hm= new HashMap<Integer, String>();        hm.put(1, "one");... read more ?

Find Second smallest number in java without sorting

Java interview Program to find second smallest number in an integer array without sorting the elements. package com.instanceofjava; class SecondSmallestNumber{   int[] x ={10,11,12,13,14,6,3,-1};           int... read more ?

Find second highest number in an integer Array

Java Interview Program to find second highest number in an integer array without sorting the elements. package com.instanceofjava; class SecondLargestNumber{   public static void main(String args[]) {   ... read more ?

How to find Biggest Substring in between specified character or String

1. Java Program to find biggest substring in between specified character or string String: i am rajesh kumar ravi in between: 'a'   package com.instaceofjava;   public class... read more ?

Java Basic Interview Programming Questions on Constructors

Below programs are the basic programs frequently asking in java quizzes  try to test your java programming skills by answering the questions. if you are having any doubts... read more ?

Select Menu