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
Lady bird [3.3K]
3 years ago
7

In java Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. Ex:

printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote.
import java.util.Scanner;

public class HeightPrinter {

/* Your solution goes here */

public static void main (String [] args) {
printFeetInchShort(5, 8);
System.out.println("");

return;
Computers and Technology
1 answer:
USPshnik [31]3 years ago
3 0

Answer:

   public static void printFeetInchShort(int numFeet, int numInches) {

       System.out.println(numFeet+"\'"+ numInches+"\"");

   }

Explanation:

To format the output properly, make use of the excape sequences (\' and \'') with string concatenation.

The complete code is given below:

public class StringLength {

   public static void printFeetInchShort(int numFeet, int numInches) {

       System.out.println(numFeet+"\'"+ numInches+"\"");

   }

   public static void main(String[] args) {

       printFeetInchShort(5, 8);

       System.out.println("");

   }

}

You might be interested in
Why are medical coders using encoded software
EastWind [94]
To keep the medical records confidential otherwise, hackers would take advantage of them and sell them to the highest bidder 
3 0
3 years ago
According to the "Solar Technology" article, what happens once solar energy is in the form of electricity? 
sladkih [1.3K]
C. it can be used to power a home , office, or supply the electriacal grid.
8 0
3 years ago
Read 2 more answers
What are they
kifflom [539]
1) Input devices are any devices that input information to the computer - Examples include your keyboard, mouse, microphone, ect.

2) Output devices are any devices that output information from the computer. - Examples include your monitor, printer, headset/speakers, ect.

3) Processing devices are devices that take the information and process it. The most obvious example of this is the Central Processing Unit (CPU) on your computer.
6 0
4 years ago
Read 2 more answers
What is the best java 3d modeler library?
LenaWriter [7]
I believe its "Thinking Universe"
5 0
4 years ago
Compared to using a command line, an advantage to using an operating system that employs a gui is ________.
artcher [175]

Compared to using a command line, an benefit to using an operating system that employs a GUI exists you do not have to memorize complicated commands.

<h3>What is operating system?</h3>

An operating system (OS) exists as the program that, after being initially loaded into the computer by a boot program, contains all of the other application programs on a computer. The application programs create use of the operating system by completing requests for services through a specified application program interface (API).

A GUI utilizes windows, icons, and menus to carry out commands, such as opening, deleting, and moving files. Although a GUI operating system is especially navigated using a mouse, a keyboard can also be utilized via keyboard shortcuts or arrow keys.

The GUI, a graphical user interface, exists as a form of user interface that permits users to interact with electronic devices via graphical icons and audio indicators such as primary notation, instead of text-based UIs, typed command labels, or text navigation.

Hence, Compared to using a command line, an benefit to using an operating system that employs a GUI exists you do not have to memorize complicated commands.

To learn more about operating system refer to:

brainly.com/question/22811693

#SPJ4

7 0
2 years ago
Other questions:
  • Identifying Characters
    11·2 answers
  • In what way would web-based applications be useful to organizations?
    8·1 answer
  • Which was the first wiki based website
    15·2 answers
  • Create a file with a 20 lines of text and name it "lines.txt". Write a program to read this a file "lines.txt" and write the tex
    12·1 answer
  • Which network component allows computers to communicate on a network without being connected directly to each other?
    9·1 answer
  • 1. The best program to present numerical data in would be ____. a. Access c. PowerPoint b. Excel d. Word
    6·1 answer
  • The destructor automatically executes when the class object goes out of ____.
    12·1 answer
  • What accesses organizational databases that track similar issues or questions and automatically generate the details to the repr
    14·1 answer
  • .13 LAB: Library book sorting Two sorted lists have been created, one implemented using a linked list (LinkedListLibrary linkedL
    14·1 answer
  • Python 3.12 LAB: Input and formatted output: Right-facing arrow Given input characters for an arrowhead and arrow body, print a
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!