
Concept explainers
Explanation of Solution
Program purpose:
Prompt the age and name of the user and covert the name into uppercase then display the age and name.
Runtime errors:
The runtime error is commonly referred to as “bug”. It occurs during the execution of the program. It represents the logic or arithmetic errors.
Error #1:
Prompting string value from the user is in wrong format.
Correct statement:
//prompt the user to enter the string value
name = keyboard.next();
Error #2:
Converting the “name” text to upper case is in wrong format.
Correct statement:
//prompt the user to enter the string value
String result = name.toUpperCase();
Corrected code:
//include the required file
import java.util.Scanner;
//definition of "Input" function
public class Input
{
//definition of main method
public static void main(String[] args)
{
//create an object for scanner
Scanner keyboard = new Scanner(System...

Want to see the full answer?
Check out a sample textbook solution
Chapter 2 Solutions
Java: An Introduction To Problem Solving And Programming Plus Mylab Programming With Pearson Etext -- Access Card Package (8th Edition)
- using r languagearrow_forwardI need help in explaining how I can demonstrate how the Laplace & Inverse transformations behaves in MATLAB transformation (ex: LIke in graph or something else)arrow_forwardYou have made the Web solution with Node.js. please let me know what problems and benefits I would experience while making the Web solution here, as compared to any other Web solution you have developed in the past. what problems and benefits/things to keep in mind as someone just learningarrow_forward
- PHP is the server-side scripting language. MySQL is used with PHP to store all the data. EXPLAIN in details how to install and run the PHP/MySQL on your computer. List the issues and challenges I may encounter while making this set-up? why I asked: I currently have issues logging into http://localhost/phpmyadmin/ and I tried using the command prompt in administrator to reset the password but I got the error LOCALHOST PORT not found.arrow_forwardHTML defines content, CSS defines layout, and JavaScript adds logic to the website on the client side. EXPLAIN IN DETAIL USING an example.arrow_forwardusing r languangearrow_forward
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage


