This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error again ( 4th time, same site ) Mr. Hareet! What will you say?

 
Arijit Daripa
Ranch Hand
Posts: 142
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr. Hareet!
One of the questions in
http://www.irixtech.com/java/scjp/mock-exam/practice-test-2 is



Your answer is (a) and (c).
(a) Java is allowing us to assign null to primitives!
(c) Returning from a method with return type null!
 
Ashish Hareet
Ranch Hand
Posts: 375
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Modified option b to be correct option

public String[ ] getNameList( ) {
return new String[ ] { "Him", "Me", "She", "I" };
}
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic