Java - Online Test - Default values -


Search Java Test Questions

 223 test questions in repository.

Java - Test Questions on 'default values' - 1 questions found

What will be the output of following ?

public class BuggyBread {

   private int x;
   private Integer y;

   BuggyBread(int x,int y){};

   public static void main(String[] args){
      BuggyBread buggybread = new BuggyBread(1,2);
Core Java
0 0
0 null
null 0
null null

  default values

comments powered by Disqus