<< Prev Showing: 236-240 of 348 Next >>
· 211-215 · 216-220 · 221-225 · 226-230 · 231-235 · 236-240 · 241-245 · 246-250 · 251-255 · 256-260 · 261-265 ·Find the error(s) in each of the following program segments. Show the corrected statement. a) System.out.printf( "%sn", 'Happy Birthday' ); b) System.out.printf( "%cn", "Hello" ); c) System.out.printf( "%cn", "This is a string" ); d) The following statement should print "Bon Voyage" with the double quotes: System.out.printf( ""%s"", "Bon Voyage" ); e) The following statement should print "Today is Friday": System.out.printf( "Today is %sn", "Monday", "Friday" ); f) System.out.printf( 'Enter your name: ' ); g) System.out.printf( %f, 123.456 ); h) The following statement should print the current time in the format "hh:mm:ss": Calendar dateTime = Calendar.getInstance()... click for more
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128642
OTA ID:
105303
Printing Dates and Times - Java
Write a program that prints dates and times in the following forms: GMT-05:00 04/30/04 09:55:09 AM GMT-05:00 April 30 2004 09:55:09 2004-04-30 day-of-the-month:30 2004-04-30 day-of-the-year:121 Fri Apr 30 09:55:09 GMT-05:00 2004
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128723
OTA ID:
101298
Write a program that prints the value 100.453627 rounded to the nearest digit, tenth, hundredth, thousandth and ten thousandth.
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128724
OTA ID:
101298
Random-number generation - Java
Write an application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition. Create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article and noun. As each word is picked, concatenate it to the previous words in the sentence. The words should be separated by spaces. When the final sentence is output, it should start with a capital letter and end witha period. THe application should generate 20 sentences and output them to a text area. The article array should contain the articles "the", "a", "one", "some", and "any"; the noun array should contain the no... click for more
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128774
OTA ID:
101298
Write a program that inputs a word from the keyboard and determines the length of the word. Print the word using twice the length as the field width.
Subject:
Computer Science
Topic:
Software Tools and Systems Programming.
Posting ID:
128775
OTA ID:
101298
<< Prev Showing: 236-240 of 348 Next >>
· 1-5 · 6-10 · 11-15 · 16-20 · 21-25 · 26-30 · 31-35 · 36-40 · 41-45 · 46-50 · 51-55 · 56-60 · 61-65 · 66-70 · 71-75 · 76-80 · 81-85 · 86-90 · 91-95 · 96-100 · 101-105 · 106-110 · 111-115 · 116-120 · 121-125 · 126-130 · 131-135 · 136-140 · 141-145 · 146-150 · 151-155 · 156-160 · 161-165 · 166-170 · 171-175 · 176-180 · 181-185 · 186-190 · 191-195 · 196-200 · 201-205 · 206-210 · 211-215 · 216-220 · 221-225 · 226-230 · 231-235 · 236-240 · 241-245 · 246-250 · 251-255 · 256-260 · 261-265 · 266-270 · 271-275 · 276-280 · 281-285 · 286-290 · 291-295 · 296-300 · 301-305 · 306-310 · 311-315 · 316-320 · 321-325 · 326-330 · 331-335 · 336-340 · 341-345 · 346-348 ·Page generated in 0.0947 seconds