Self-test questions

Q1) Guess what is wrong with this method:

void doSomething(){
  return 4;
}

Q2) What will x be equal to at the end of this code snippet?

int x=19;
do{
  x=11;
  x++;
}while(x<20)

Get Learning Java by Building Android Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.