ITM 200 Lecture Notes - Delimiter, Substring

140 views4 pages

Document Summary

It has a textbox in which the user may type in a string (input). A input box will appear on the screen asking you to enter your first integer. Suspose you type 42 into the text field, when the user presses the ok button, the showinputdialog method will return with a string of 42 . If you do another input integer of 24 with test2 string, you will have 42 and 24. You must convert these string variables into integers in order to do calculations. *note: for charat(), the position starts at 0. It is required to find the character at a specific position in a particular string* String s= hello ; s. charat(0); is h s. charat(1); is e s. charat(2); is l. Declare a integer variable (mytest) so you can store the int equilvaent of the string (test1) in the variable: Primitive type variables: float numbers, chars, doubles, and integers = literal values.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents