Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

thangeram

  • 3 years ago

look at the both programs Carefully 1- public class scannerClass { scannerClass (int a) // a constructor which print value a { int av; av=a; System.out.println(a); } public static void main(String ar[]) {int k; scannerClass a = new scannerClass(32); //value is pass directly when object is created //a.??? only Object class method will be shown }} 2- public class scannerClass { int ScannerClass(int a) //constructor with return type { int av; av=a; System.out.println(a); return a; } public static void main(String ar[]) {int k; //scannerClass a = new sc

  • This Question is Closed

    Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy