Upgrade to remove ads
Computer Programming Quiz Input, Output, Strings
Terms in this set (15)
To use an object in a program, what must you do first?
Declare it-name it, then create it, then send a message to it.
What does "userInput = new Scanner(system.in);" do?
It declares and creates the object, userInput is the object name.
How do you output something? what is standard output
in "System.out.println" what is System?
System is the class.
What is a string?
a sequence of characters inside () separated by quotes
String is a class which means we can do what?
Create an object within it
What are the three main methods defined in the String class?
Substring, length, and indexOf
What does the substring method do?
The substring method tells us certain characters when we enter specific character positions.
What does the length method do?
With the length method we can find out the number of characters in a string object.
How do we use the length method?
you take your int and do intname = intname.length();
How do we use the substring method?
you use the name of the string then .substring and the numbered position of the word you want to print.
In programming what number do you start at when numbering?
0 NOT 1
What is String Concatenation?
When you add two strings together using the + symbol.
in the String "Falmouth Yachtsmen" what number positions do you enter in the substring to produce "mouth"
What is the name given to a character (for example a space or a comma) that separates the words in a string?
YOU MIGHT ALSO LIKE...
Java Ch 7 Review
ch 7 java
Java Chapter 1 Terms
OTHER SETS BY THIS CREATOR
Latin Vocab quiz #2
ELA Vocab quiz #2
Middle eastern cities