Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Type in and run the following program and submit program? (9 points). Then answer the following questions (3 points for each sub question) (total 30

Type in and run the following program and submit program? (9 points). Then answer the following questions (3 points for each sub question) (total 30 points).

a. What is in line 5? How is it used in the program?

b. What is in line 6? How is it used in the program?

c. Explain line 8. What is String, testString, =, This is a Test

d. Explain line 9. What is testString , toLowerCase();

e. Explain line 12. What is the outcome?

f. Explain line 13. What is the outcome?

g. Explain the difference between line 16 and line 17?

public static void main(String[] args) {

int length;

String newTestString;

String testString = "This is a Test";

String bigTestString = testString.toUpperCase();

String smallTestString = testString.toLowerCase();

newTestString = bigTestString + smallTestString;

length = testString.length();

System.out.println(testString);

System.out.println("String in uppercase: "+ bigTestString);

System.out.println("String in lowecase: "+ testString.toLowerCase());

System.out.println("NewTestString is: " + newTestString);

System.out.println("Length of String is: " + length);

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

12-5 How will MIS help my career?

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago