Computer Programming Quiz Input, Output, Strings

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is String Concatenation?

When you add two strings together using the + symbol.

What does the length method do?

With the length method we can find out the number of characters in a string object.

What is a string?

a sequence of characters inside () separated by quotes

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.

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 are the three main methods defined in the String class?

Substring, length, and indexOf

How do we use the length method?

you take your int and do intname = intname.length();

In programming what number do you start at when numbering?

0 NOT 1

in the String "Falmouth Yachtsmen" what number positions do you enter in the substring to produce "mouth"

3,8

String is a class which means we can do what?

Create an object within it

What is the name given to a character (for example a space or a comma) that separates the words in a string?

Delimeter

What does "userInput = new Scanner(system.in);" do?

It declares and creates the object, userInput is the object name.

in "System.out.println" what is System?

System is the class.

How do you output something? what is standard output

System.out.print

What does the substring method do?

The substring method tells us certain characters when we enter specific character positions.


Kaugnay na mga set ng pag-aaral

Psychology today(7 contemporary approaches)

View Set

English Plus 1 Unit 1 Free time activities

View Set

Ch 38 Degenerative Musculoskeletal Disorders

View Set

Chapter 14: Bonds and Long-Term Debt

View Set

N204 - Midterm Practice Questions

View Set

Communication, Collaboration, Conflict Resolution

View Set

Earth & Space Science Earthquake study

View Set

Chapter 38: Assessment and Management of Patients With Rheumatic Disorders

View Set