how do you store phone numbers using java collections
Answer Posted / shahnawaz sheikh
Using HashMap.. can be one of the way.
HashMap hs = new HashMap();
hs.put("amit","989213232");
hs.put("john","989211422");
hs.put("Alex","989214578");
| Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
Are registers volatile?
Can a private method of a superclass be declared within a subclass?
What will happen when using pass by reference in java?
Why is java so popular?
What is exception hierarchy in java?
What is serialversionuid?
What is oops in java?
What is core java called?
how a programmer confirms that the data submitted has been succesfully inserted into the database(either oracle or my sql).. How a programmer confirm if there is any problem with the program he wrote for insertion... ANS:--- >executeupdate method is having boolean return type, if anything goes wrong in data insertion or data updation, it would return false. otherwise, if it successfully inserts data into the database, it would return true NOW HOW TO I CHECK IN MY DURING EXECUTION WHETHER IT RETURNS TRUE OR FALSE... WELL IT WILL DISPLAY ANY MESSAGE OR NOT
Which types of exceptions are caught at compile time?
What is bool mean?
What are keywords and reserved words in java?
What does it mean that strings are immutable?
What is append in java?