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
The main thing that adjusting the aperture controls when taking an image is?
Pani-rosa [81]
The temperature controller
6 0
3 years ago
Two categories of payroll deductions are required deductions and ___ deductions.
alukav5142 [94]

Answer:

1.)

- C.) Optional

2.)

- D.) Short-term Notes Payable

3.)

- A.) Payroll Sinking Funds

4.)

- A.) A Formal Timekeeping System Is Used

(I'm possibly wrong on the last question, if so then my apologies and I wish you the best of luck.)

3 0
2 years ago
Read 2 more answers
How do you think weather can affect sailing?<br><br>What would be good sailing weather?​
N76 [4]

Answer:

Weather can affect sailing because if its raining it can sink it also if theres a storm. Good weather that would be good to sail in is if its a little windy because if its just sunny and not windy it wont move. ps you can copy it if u want idc

6 0
3 years ago
Percentage-wise, which renewable energy source is used most?
Natasha2012 [34]
C)Hydroelectric I believe.
5 0
3 years ago
Dynamic programming does not work if the subproblems: ___________
nirvana33 [79]

Answer:

A. Share resources and thus are not independent

Explanation:

This would be the answer. If this is wrong plz let me know

6 0
2 years ago
Other questions:
  • What type of installation should you perform if you want to install a 64-bit version of Windows on a computer that already has a
    8·1 answer
  • (It science question)
    9·1 answer
  • "This part of the computer fetches instructions, carries out the operations commanded by the instructions, and produces some out
    15·1 answer
  • Tom is very curious as to whether terrorism is truly linked to levels of religiosity around the world. As such, he gathers data
    15·1 answer
  • How to solve a program that accepts a number as input and prints just the decimal portion
    15·2 answers
  • If the computer has an encrypted drive, a ____ acquisition is done if the password or passphrase is available. a. passive b. sta
    8·1 answer
  • How do you calculate the life span of patents?
    13·1 answer
  • Uploading Your Work
    14·1 answer
  • Day 1 of seeing if anyone will buy me a psn gift card (if u do u get brainliest and thanks + alot of points
    11·1 answer
  • How is information processed within a<br> motherboard between the hard drive, CPU and RAM,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!