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
Oksanka [162]
3 years ago
6

userInput = scnr.nextLine(); firstLetter = scnr.nextLine().charAt(0); if ( = firstLetter ) { System.out.println("Found match: "

+ firstLetter); } else { System.out.println("No match: " + firstLetter); } return;
Engineering
1 answer:
Darina [25.2K]3 years ago
5 0

Complete Question

Write an expression to detect that the first character of userInput matches firstletter

import java.util.Scanner;

public class CharMatching

{

public static void main (String [] args)

{

Scanner scnr = new Scanner (System.in);

string userInput;

char firstLetter;

userInput = scnr.nextLine();

firstLetter = scnr.nextLine().charAt(0);

if ( = firstLetter ) {// Your solution goes here

System.out.println("Found match: " + firstLetter); }

else { System.out.println("No match: " + firstLetter); }

return;

}

}

Answer:

Replace if( = firstLetter) with the following

if(userInput.CharAt(0) == firstLetter)

What the above code segment does is that it extracts the first character of userInput and compare it with the content of firstLetter

The full program becomes

import java.util.Scanner;

public class CharMatching

{

public static void main (String [] args)

{

Scanner scnr = new Scanner (System.in);

string userInput;

char firstLetter;

userInput = scnr.nextLine();

firstLetter = scnr.nextLine().charAt(0);

if(userInput.CharAt(0) == firstLetter){

System.out.println("Found match: " + firstLetter); }

else { System.out.println("No match: " + firstLetter); }

return;

}

}

Explanation:

You might be interested in
name the process by which mild steel can be converted into high carbon steel and explain it briefly ?​
Fudgin [204]

Answer:

please give me brainlist and follow

Explanation:

Mild steel can be converted into high carbons steel by which of the following heat treatment process? Explanation: Case hardening, also referred as carburizing increases carbon content of steel, thus, imparting hardness to steel.

6 0
3 years ago
A slight breeze is blowing over the hot tub above and yields a heat transfer coefficient h of 20 W/m2 -K. The air temperature is
patriot [66]

Answer:4050 W

Explanation:

Given

Heat transfer Coefficient(h)=20 W/m^2-K

Air temperature =75 F

surface area(A)=7.5 m^2

Temperature of hot tube is 102 F

We know heat transfer due to convection is given by

Q=hA\left ( \Delta T\right )

Q=20\times 7.5\left ( 102-75\right )=4050 W

7 0
3 years ago
The normal stress at gage H calculated in Part 1 includes four components: an axial component due to load P, σaxial, P, a bendin
Degger [83]

Answer:

hello your question has some missing information attached to the answer is the missing component

Answer : αaxial,p = -6.034 ksi ( compressive )

             αbend,p = 19.648 ksi ( tensile )

Explanation:

αaxial, p = \frac{-p}{A}   equation 1

αbend, p = \frac{(P*A)*\frac{d}{2} }{I_{z} } equation 2

P = load = 35 kips

A = area of column = 5.8 in^{2}

d = column cross section depth = 9.5 in

I_{Z} = 55.0 in^{4}

Hence equation 1 becomes

αaxial,p = -35 / 5.8 = - 6.034 ksi ( compressive )

equation 2 becomes

αbend, p = \frac{(35*6.5)(\frac{9.2}{2}) }{55} = + 19.648 ksi ( tensile )

7 0
3 years ago
Two particles have a mass of 7.8 kg and 11.4 kg , respectively. A. If they are 800 mm apart, determine the force of gravity acti
aleksley [76]

Answer:

A) About 9.273 \times 10^{-9} newtons

B) 76.518 newtons

C) 111.834 newtons

Explanation:

A) F_g=\dfrac{GM_1M_2}{r^2} , where G is the universal gravitational constant, M 1 and 2 are the masses of both objects in kilograms, and r is the radius in meters. Plugging in the given numbers, you get:

F_g=\dfrac{(6.67408 \times 10^{-11})(7.8)(11.4)}{(0.8)^2}\approx 9.273 \times 10^{-9}

B) You can find the weight of each object on Earth because you know the approximate acceleration due to gravity is 9.81m/s^2. Multiplying this by the mass of each object, you get a weight for the first particle of 76.518 newtons.

C) You can do a similar thing to the previous particle and find that its weight is 11.4*9.81=111.834 newtons.

Hope this helps!

3 0
3 years ago
The 1000-lb elevator is hoisted by the pulley system and motor M. The motor exerts a constant force of 500 lb on the cable. The
klemol [59]

The power that must be supplied to the motor is 136 hp

<u>Explanation:</u>

Given-

weight of the elevator, m = 1000 lb

Force on the table, F = 500 lb

Distance, s = 27 ft

Efficiency, ε = 0.65

Power  = ?

According to the equation of motion:

F = ma

3(500) - 1000 = \frac{1000}{32.2} * a

a = 16.1 ft/s²

We know,

v^2 - u^2 = 2a (S - So)\\\\v^2 - (0)^2 = 2 * 16.1 (27-0)\\\\v = 29.48m/s

To calculate the output power:

Pout = F. v

Pout = 3 (500) * 29.48

Pout = 44220 lb.ft/s

As efficiency is given and output power is known, we can calculate the input power.

ε = Pout / Pin

0.65 = 44220 / Pin

Pin = 68030.8 lb.ft/s

Pin = 68030.8 / 500 hp

     = 136 hp

Therefore, the power that must be supplied to the motor is 136 hp

5 0
4 years ago
Other questions:
  • the ____ method is the safest turning technique to use as it does not expose your hands to the airbags deployment area
    15·1 answer
  • More discussion about seriesConnect(Ohm) function In your main(), first, construct the first circuit object, called ckt1, using
    10·1 answer
  • Two AAA-size lithium batteries are connected in series in a flashlight. Each battery has 3.5 volt and 4- Amp-hour capacity. If t
    8·1 answer
  • In the fluid-flow analogy for electrical circuits, what is analogous to a conductor?
    6·1 answer
  • BIG POINTS AND WILL GIVE BRAINLIEST! Answer all 5 please or I can’t give brainliest and might report!
    10·1 answer
  • Which option identifies the type of engineering technician most likely to be involved in the following scenario?
    9·1 answer
  • I really need help i will give brainly plz no funny answers
    14·1 answer
  • The art of manipulating, influencing, or deceiving you into taking some action that isn’t in your best interest or in the best i
    5·1 answer
  • Which one of the following best defines hardness: (a) energy absorbed by a material when an object strikes its surface, (b) resi
    8·1 answer
  • What are the two (2) different design elements of scratch?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!