Saved Bookmarks
| 1. |
Study the following code and answer the questions that follow:String str="Green World, Clean World";int len=str.length(),remain;remain=100-len;jTextField2.setText(str.toUpperCase());jTextField3.setText(Integer.toString(remain)+" more charachters can be entered");(i) Predict the output displayed in text fields named jTextField2 and jTextField3 after running the above code.(ii) Identify and name any two method of String class used in the above code. |
|
Answer» (i) GREEN WORLD, CLEAN WORLD 76 more characters can be entered (ii) length(),toUpperCase() |
|