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
What is the velocity of a 0.100kg car with a momentum of 5 kgm/s?
Cerrena [4.2K]

Answer:

v = 50 m/s

Explanation:

p = mv

5 = 0.1v

v = 50

4 0
2 years ago
What is the final value for X ?<br><br> x= 1<br><br> x=13<br><br> x= x+3<br><br> x=0
a_sh-v [17]

Answer:

x=13

Explanation:

6 0
3 years ago
Which button is used to open the Start menu in Windows Vista?
Karo-lina-s [1.5K]
The answer is B. Windows icon
4 0
3 years ago
Arman, a friend of your dad, has a computer running Windows 7 and wants to perform an upgrade. He has only 3GB of RAM in his com
torisob [31]

Answer:

Low memory?

So to fix the problem you could add more memory to the machine.

Explanation:

8 0
3 years ago
Question 83 :Which type of fiber optic connector connects to a terminating device by pushing the connector into the terminating
STALIN [3.7K]

The Lucent connector(LC) is a type of fiber optic connector used here.

Explanation:

A Lucent connector (LC) is a type of fiber optic connector connects to a terminating device by pushing the connector into the terminating device and can be removed by depressing the tab on the connector and pulling it out of the terminating device.

It is a standard ceramic Ferrule connector and has good performance and is favored for single mode.

LC is a latched connector which have same handling capacities like SC. They have small flange on top similar to an RJ-45 connector that aids secure connection. It has a smaller connector housing and a smaller 1.25 mm ferrule.

3 0
3 years ago
Other questions:
  • . When you create a template class, ___________.
    15·1 answer
  • Which is not an element of photography? a Cropping b Height c Directional Lighting d Framing
    11·1 answer
  • Some data files should be totally hidden from view, while others should have ____ so users can view, but not change, the data.
    11·1 answer
  • Ricardo twists his ankle at work but does not immediately realize that he is injured because his ankle is not sore or swollen, a
    5·1 answer
  • Use the variables k and total to write a while loop that computes the sum of the squares of the first 50 counting numbers, and a
    6·1 answer
  • Your friend has a great idea for a new app, and she shows you a document that outlines what the app will do. This document is an
    6·1 answer
  • Answer the questions about PowerPoint using the drop-down menus,
    15·2 answers
  • You are developing a Website that is going to be viewed extensively on smartphones and tablets. Which of the following should yo
    7·1 answer
  • Explain Http and Ftp​
    12·1 answer
  • True or false. windows server standard edition supports software-defined networking
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!