Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problems with createRecord

 
Frank Verbruggen
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am currently working on assignment 2.2.2
Bodgitt and Scarper, LLC

the assignment specifies that I be able to create a record, given a String array.
The only exceptional state I can give as feedback is when I try to insert a record with an identical key to a previous record.
I wonder now what to do when the client program (suppose it is malicious) tries to insert a String array which is incompatible with my table definition.
Does any have a good idea about what to do ???

My thanx
 
Eric Chang
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think many people have ended up throwing a RuntimeException, which you don't have to declare in the method signature as being thrown, therefore not changing the interface that you were provided.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!