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
scoray [572]
3 years ago
12

Declare a character variable letterStart. Write a statement to read a letter from the user into letterStart, followed by stateme

nts that output that letter and the next letter in the alphabet. End with a newline. Hint: A letter is stored as its ASCII number, so adding 1 yields the next letter. Sample output assuming the user enters 'd': de
Computers and Technology
1 answer:
natka813 [3]3 years ago
8 0

Answer:

public class ANot {

   public static void main(String[] args) {

       System.out.println("Enter a char");

       Scanner in = new Scanner(System.in);

       char letterStart = in.next().charAt(0);

       char nextCha = (char)(letterStart+1);

       System.out.print(letterStart);

       System.out.println(nextCha);

   }

}

Explanation:

The main logic here is understanding that characters in Java are stored as ASCII numbers and as such some mathematic operations can be carried out on them. So we add 1 to the value of the entered character to get the character next to it, the opposite is also possible (Subtracting 1 to get the value before it)

Note also that in reading a character using the scanner class Java does not support the nextChar like it does for other primitive data types so we use the method charAt(). To obtain the character at a particular index.

You might be interested in
15. How many PC’s can be connected to a UPS?
Alex_Xolod [135]

Answer: Depends on the power of the computer /computers and the UPS

Explanation: For someone who had a big connected network of computers and printers we would plug the computer or server into the UPS as well as the monitor and sometimes a printer sometimes the monitor was plugged into the wall

When you get a UPS you must plug it in for a certain time could be hours or even a day.  A USP has a big battery in it and you must charge it (sometimes it comes semi-charged but you must plug it in to strengthen it. )

there are two connector wires that you affix to the battery and you must put a lot of strength into it to make it secure.

So in closing, you can get away with two like a desktop and a laptop.

Read your documentation that comes with the UPS

6 0
2 years ago
Just letting all my friends know, i am deleting this account and making a new one same username and profile picture so you know
ki77a [65]

Answer:

Explanation:

OK good luck

3 0
3 years ago
Read 2 more answers
Read the following scenario. How might Sarah correct successfully complete her task?
nexus9112 [7]

Answer:

Explanation:

A: To permanently remove a file from her computer, Sarah doubled-clicked on the My Computer icon and searched for her file under the “Uninstall or change a program” menu option.

or

b: empty the recycle bin : You can permanently delete a program file installed in the computer by following the procedure in option A. The option above will take you to the control panel and you'll be able to select the program you'd want to permanently remove. If you had initially deleted a file like a picture or a document or anything else that you necessarily do not need, it will go to recycle bin. You can head over there and select the Empty the Recycle Bin option to permanently delete the file.

4 0
3 years ago
An organism which must obtain its food from other organism is called a ​
Sophie [7]

Answer:

Heterotrophs

Explanation:

Heterotrophs, or consumers, are organisms that must obtain energy by consuming other organisms (autotrophs or other heterotrophs) as food.

5 0
4 years ago
Read 2 more answers
What is a scenario where records stored in a computer frequently need to be checked
vazorg [7]

if your in  school and always are getting into trouble the school will always be checking your records


7 0
3 years ago
Read 2 more answers
Other questions:
  • What are the 6 external componets to a computer?
    7·1 answer
  • What is the most important part of the course that you have learned about so far?
    11·2 answers
  • Diane wants to maintain a record of percent change in sales from the year 2000 to the present year. She enters the values of per
    10·1 answer
  • What does Tristan need to do to add a row at the<br> bottom of the table shown?
    6·1 answer
  • List three things that scientists learned about earth beginning in the 1800s
    13·1 answer
  • What are the four elements of game design?<br><br> Help Me!!
    9·1 answer
  • Selling R frog for 50 r-obux on r-oblox!!! dont answer if u not gonna buy it
    15·2 answers
  • Drew is creating a game that stops the timer when the hourglass
    15·1 answer
  • Which of the following is a good design tip.
    5·1 answer
  • How to get amount after a percentage increase in excel​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!