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
A quick boot allows you to do what?
WITCHER [35]
Access the BIOS setup
6 0
3 years ago
Read 2 more answers
Directions: Using the decoder key and the code chart on the second page, find out the name that has been coded. After coding the
Karo-lina-s [1.5K]

What is the decodder key???

7 0
4 years ago
Use the drop-down menus to complete statements about back-up data files.
vlada-n [284]

Answer:

the third one trust me

Explanation:

5 0
3 years ago
Read 2 more answers
In the lab, you created a Group Policy Objects Report and a Resultant Set of Policy Report that can be used to __________ the gr
vekshin1
Regroup i think that is the answer

6 0
4 years ago
6.3.6: Adding to a Value codehs<br> help i don't know what to do .
QveST [7]

Question:

Write a function that adds together all values from 0 to a given value and returns the final number. For example, if the given value is `4`, you would add 0 + 1 + 2 + 3 + 4

Answer:

In Python:

def add_to_value(n):

   sum = 0

   for i in range(n+1):

       sum = sum + i

   

   return sum

Explanation:

This line defines the function

def add_to_value(n):

This line initializes sum to 0

   sum = 0

The following iteration adds from 0 to n

<em>    for i in range(n+1):</em>

<em>        sum = sum + i</em>

   

This line returns the calculated sum

   return sum

4 0
3 years ago
Other questions:
  • What cell address indicates the intersection of the first row and the first column in a worksheet?
    15·2 answers
  • What device can boost an analog signal? a digital signal?
    12·1 answer
  • How can a user begin working with a new, blank workbook in Excel?
    10·1 answer
  • When studying an information system, illustrations of actual documents should be collected using a process called _____.
    12·1 answer
  • Why when i create a powerpoint on word it doesn't open properly in other programmes
    5·1 answer
  • Which of the following is the definition of Internet Protocol Security ( IPSec)? A remote access client/server protocol. It is a
    13·2 answers
  • Why is ipsec considered to be a transparent security protocol?
    6·1 answer
  • Which of the following identifies the patterns used for each data series in a chart?
    12·1 answer
  • True or False: Variablename must start with a number.
    13·1 answer
  • A(n) Blank______ database model stores data in the form of logically related two-dimensional tables. Multiple choice question. w
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!