JAVA CODE SNIPPET-4

Java Code Snippet-4
/**
 * 
 */
package techyield;

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

}
package techyield;
/**
 * @author satyanarayana gokavarapu
 *
 */
public class Test extends Super{

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

Select an answer





Please comment below if you have any doubts.

1 comment:

  1. Thank you! very nice, clear and helpful post on java. keep posting more articles on Devops Training

    ReplyDelete

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...