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
​in a data dictionary, a(n) _____ is the smallest piece of data that has meaning within an information system.
Ksivusya [100]

In a data directory, a 01 is the smallest piece of data that has meaning within an information systems.

4 0
4 years ago
Nonword passwords are vulnerable to a ________ attack in which the password cracker tries every possible combination of characte
Stels [109]
That would be your name and then you date of birth 
6 0
3 years ago
Read 2 more answers
These are questions from my Computer/Customer Support Class
vladimir2022 [97]
Hey

1. Workers 

2. im not sure about this on

3. The

Hoped I Helped
5 0
3 years ago
Constructors are special methods included in class definitions. a. What is a constructor used for? b. How do constructors differ
PIT_PIT [208]

Answer:

(a)A constructor is a special method which is used the initialize the class that means the initialize the object of a class.

(b)There is the following difference between constructor and method in a class.

1. Constructor name has the same name as the class name we do not give any other name to the constructor, on the other hand, it is possible in function to giving any name to function.

2. The constructor does not have return type such as int, void, etc on the other hand function must have a return type.

3.constructor does not return any value on the other hand function are returning the value.

Explanation:

Following are the program of constructor in c++

#include <iostream> // header file

using namespace std; // namespace

class constructor1

{

   public:

   constructor1() // default constuctor

   {

       cout<<" hello brainly:"<<endl;  

   }

void fun() // fuuction

{

cout<< "function:";

}

};

int main() // main function

{

constructor1 ob; // creating object it call default constructor

ob.fun();//  calling the function fun()

  return 0;

}

Output:hello brainly:

function:

In this program, we create a class and create a function "fun" and "default "constructor "from the main function we create the object of a class which calls the default constructor and with the help of object we call the function fun.

6 0
3 years ago
in a stop-and-wait arq system, the bandwidth of the line is 1 mbps, and 1 bit takes 10 ms to make a round trip. if the system da
MArishka [77]

Answer:

٢٣٤

Explanation:

5 0
3 years ago
Other questions:
  • How to write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator).
    13·1 answer
  • What is the prediction in technology for the future?
    6·1 answer
  • Clep allows students to do all of thw following except which?
    9·2 answers
  • What is C.R.A.T systems used for?
    9·1 answer
  • What command would Emile use in his word processing software to insert a bar chart that will automatically adjust to changes mad
    6·2 answers
  • Which of the following bit value represent -5 in two's complement notation?
    5·1 answer
  • What specific job usually includes the important pre-production step of making the
    12·1 answer
  • Guys how can i video my self from my laptop <br> my laptop is (lenovo)
    8·2 answers
  • Davids family took him to a hospital as he was suffering from a sericous ailment
    8·1 answer
  • What combination of keys will autofill highlighted cells to the right?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!