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
andrew11 [14]
3 years ago
12

Suppose we have a String object called myString. Write a single line of Java code

Computers and Technology
1 answer:
VikaD [51]3 years ago
5 0

Answer:

myString=myString.toUpperCase();

Explanation:

In java to change all characters of a string to upper case we use .toUpperCase() method.It will convert string to upper case.

Implementation in java.

import java.util.*;

class Solution

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

Scanner scr=new Scanner(System.in);

System.out.print("Enter a string:");

String myString=scr.nextLine();

myString=myString.toUpperCase();

System.out.println("string in upper case : "+myString);

         }catch(Exception ex){

       return;}

}

}

Output:

Enter a string:hello

string in upper case : HELLO

You might be interested in
Write a program to calculate the
marishachu [46]

Answer:

blep blep blep belp belp belp belp belp belp BELPPPPPPPPPP

5 0
3 years ago
This has nothing to do with anything school related, but I'm new to car audio and I was wondering, what happens or what would ha
DerKrebs [107]
It most likely can but It may damage your system. So you should seek out professional help from a car dealership and do more research.

Hope this helps.<span />
7 0
3 years ago
1. What is wrong with the following code?
uranmaximum [27]

Answer:

Aye dog I don't know nothing about code, yes its true, but I hope that you get an answer for you!

Explanation:

Facts...

5 0
3 years ago
An independent penetration testing company is invited to test a company's legacy banking application developed for Android phone
erastovalidia [21]

2010s is the one who created the iPhone

8 0
3 years ago
Write the steps to create labels in OpenOffice writer
jenyasd209 [6]

1. Start up Open Office.Org.

2. Click on File >> New >> Labels.

3. In the label dialog box, click on the brand box. This will allow you to choose the type of paper that you use.

4. Select the type of document that you want. The usual standard is Avery, but feel free to explore and discover what you like.

5. Select if you want a single label, a document, and any other options. Some of the things you might want to do are:

- Create a variety of labels for folders or drawers

- Create a sheet of address labels

-  Create decorative labels

6. Click New Document. Here, you see a sheet of blank labels.

7. Create the type of format/placement that you want for your labels. Once you are happy with it, copy it to the rest of the labels.

8. Fill your labels with necessary information.

9. Print them out.

3 0
3 years ago
Other questions:
  • What dose it need For a device to be considered a kind of computer
    14·2 answers
  • Which consumer document is most likely to help you if you have trouble figuring out how to operate a device
    6·1 answer
  • Which computing component is similar to the human brain
    6·2 answers
  • Freya realizes she does not have enough in her bank account to use the debit card. She decides to use a credit card instead. Whi
    7·2 answers
  • To copy the formatting of one control to other controls, use the ____ button on the form design tools format tab.
    7·1 answer
  • In symmetric encryption the same key is used to encrypt and decrypt a message. in asymmetric encryption different keys are used
    6·2 answers
  • is this statement true or false ? satelite and remote sensing devices have helped cartographers make more accurate maps with spe
    12·1 answer
  • Given the integer variables x, y, and z, write a fragment of code that assigns the smallest of x, y, and z to another integer va
    7·1 answer
  • I need help fixing this please
    6·2 answers
  • Select the correct answer.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!