1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Rasek [7]
3 years ago
14

I. Given the following Java code fragment, what is output? int a, b; String c, d, e; String x = new String("I LOVE"); String y =

"java!"; a = x.length( ); System.out.println("1) " + a); b = y.length( ); System.out.println("2) " + b); c = y.toUpperCase( ); System.out.println("3) " + c); d = x.toLowerCase( ); System.out.println("4) " + d); e = x.concat(y); System.out.println("5) " + e);
Computers and Technology
1 answer:
Levart [38]3 years ago
7 0

Answer:

Output: The question segment gives the following output--

1) 6

2) 5

3) JAVA!  

4) i love

5) I LOVEjava!

Explanation:

  1. "1) 6" comes because "6" is the length of "I LOVE" which is the value of "x" variable and "x.length( )" statement gives the length of the value of "x" variable which is stored on "a" variable and "a" will be printed with "1)" symbol.
  2. "2) 5" comes because "5" is the length of "java!" which is the value of "y" variable and "y.length( )" statement gives the length of the value of "y" variable which is stored on "b" variable and "b" will be printed with "2)" symbol.
  3. "3) JAVA! " comes because "JAVA!" is the upper case letter of "java!" which is the value of "y" variable and "y.toUpperCase( )" statement change the value from lower case to uppercase of the value of "y" variable which is stored on "c" variable and "c" will be printed with "3)" symbol.
  4. "4) i love " comes because "i love" is the lower case letter of "I LOVE" which is the value of "x" variable and "x.toLowerCase( )" statement change the value from uppercase to lowercase of the value of "x" variable which is stored on "d" variable and "d" will be printed with "4)" symbol.
  5. "5) I LOVEjava! " comes because " I LOVEjava! " is the mixed value of the "x" and "y" variable. It prints because "x.concat(y);" statement combines the x and y value and stored in an "e" variable and "e" will be printed with "5)" symbol.
You might be interested in
Describe how being a global citizen in the world of advanced technology can be beneficial to your success in meeting your person
olga55 [171]

Answer:

well you could have more options of careers and more possibilities, online jobs can pay more and give more experience to the employees

7 0
3 years ago
Ayuda no encuentro la información de estas tres preguntas:
Morgarella [4.7K]

Answer:

Sorry i don't know.........!!!!!!!!!!

Explanation:

3 0
3 years ago
Sharon's company has written a new computer program, and she has been asked to find a way to prevent people from copying the sof
Tasya [4]

Answer:

Sharon's company has written a new computer program, and she has been asked to find a way to prevent people from copying the software they purchase and giving it to others who have not purchased the software. What can Sharon's company do to make sure a customer who p…

A:

Use DRM.

Explanation:

Use DRM.

8 0
2 years ago
I get brainlist to whoever can help my computer is doing this and I have class and it’s not working and I got it wet yesterday b
liq [111]

Answer:

try putting a lot of rice on the screen.

Explanation:

if it got water in it that should help it.

3 0
2 years ago
Read 2 more answers
Interactive sites where users write personal topics and comments to a threadded discussion are called?
Eddi Din [679]
The correct answer would be Forums
5 0
3 years ago
Other questions:
  • A ___ is the basic collective unit of data in a computer.
    12·1 answer
  • For a loop counter, the appropriate data type would be:
    14·1 answer
  • Which of these browsers was the first widely adopted?
    12·1 answer
  • Please conduct some research and find an article on Security Threats and please provide link of the article.
    5·1 answer
  • Which documents might an employer expect to find in a career portfolio?
    15·2 answers
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • PLEASE HURRY!!!!<br> Look at the image below
    8·1 answer
  • Para ti que es el sexting​
    11·1 answer
  • Please respond not with answer but with comment.
    12·1 answer
  • What is the difference between a computer’s RAM and its hard disk?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!