Showing posts with label Java Code Snippet-7. Show all posts
Showing posts with label Java Code Snippet-7. Show all posts

JAVA CODE SNIPPET-7

JAVA CODE SNIPPET-7
/**
 * 
 */
package techyield;

/**
 * @author satyanarayana gokavarapu
 *
 */
public class Super {
 void init( long a,long b)
 {
  System.out.println("Super class long,long method.");
 }
 void init( Long a,Long b)
 {
  System.out.println("Super class Long,Long method.");
 }
}
package techyield;
/**
 * @author satyanarayana gokavarapu
 *
 */
public class Test extends Super{

 public static void main(String[] args) {
  // TODO Auto-generated method stub
  Super object = new Test();
  object.init(2,3);
 }
 void init( int a,int b)
 {
  System.out.println("Test class int,int method.");
 }
 void init(int... a)
 {
  System.out.println("Test class varargs method.");
 }
 void init( long a,long b)
 {
  System.out.println("Test class long,long method.");
 }
}

Select an answer





Please comment below if you have any doubts.

Featured Post

H1B Visa Stamping at US Consulate

  H1B Visa Stamping at US Consulate If you are outside of the US, you need to apply for US Visa at a US Consulate or a US Embassy and get H1...