PRACTICE
.
3. Write a program asks the user to enter their first name and their last name, separated by a space.
Break the input string up into two strings, one containing the first name and one containing the last
name. You can do that by using the indexOf() subroutine to find the position of the space, and then
using substring0 to extract each of the two names. (should save each into its own variable)
• A sample run of the program should look something like this:
Please enter your first name and last name, separated by a space. ?
Mary Smith
Your first name is Mary.
Your last name is Smith.

(I am using Notepad)​

Answers

Answer 1

class Name

{

public static void main(String args[])

{

String name, firstName,lastName;

int blankIndex,fchar,lchar;

System.out.println("Enter your name having space between first name and last name");

Scanner in = new Scanner(System.in);

name= in.nextLine();

blankIndex = name.indexOf(' ');

firstName = name.substring(0,blankIndex-1);

lastName = name.substring(blankIndex+1, name.length()-1);

fchar = firstName.length();

lchar = lastName.lenght();

System.out.println("You entered the name"+name); Â Â

System.out.println("Your firstname is"+firstName+"has"+fchar+"characters" );

System.out.println("Your lastname is"+lastName+"has"+lchar+"characters" );

}

}


Related Questions

some critics aruge that excessive media consumption can encourage______.
A. deeper reading
B. taking breaks from using digital media
C an unhealthy lifestyle
D. healthy friendships

Answers

c. an unhealthy lifestyle

Use the drop-down menus to complete statements about importance and sensitivity levels. The Low Importance level is rarely used, and the High Importance level should be used . The sensitivity levels are personal, private, and . Sensitivity levels are basically only , as they appear on the Info Bar in the message.

Answers

Answer:

first blank- cautiously

second blank- confidential

third blank- informational

Explanation:

i got it correct on edge 2020

The Low Importance level is rarely used, and the High Importance level should be used cautiously.

What is cybersecurity?

Cybersecurity can be defined as a preventive practice that involves the protection of computers, networks, software programs, servers and data (information) from unauthorized access, potential theft, attack, or damage, especially by using a body of technology, frameworks, processes and network engineers.

In Cybersecurity, the use of the various security levels include:

The sensitivity levels are personal, private, and confidential. Sensitivity levels are basically only informational, as they appear on the Info Bar in the message.

Read more on Cybersecurity here: https://brainly.com/question/14286078

#SPJ2

para saan po yung points dito?

Answers

Answer:

Hindi kudin Alam eh hahahha

Answer:

Hey, there this is the answer

Users need to use points to post a question. The more points they use, the more quickly their question will be answered. Users gain a basic number of points each time they log into the platform.

who presented pakistan resolution​

Answers

Search Results
Featured snippet from the web
Fazlul Huq, the Prime Minister of Bengal, was a formal political statement adopted by the All-India Muslim League on the occasion of its three-day general session in Lahore on 22–24 March 1940.

I got it from google!

Why does a computer need primary and secondary memory ?

Answers

Primary memory are generally faster but costlier
And secondary memory are slower but cheaper
You need a combination of both
So need most frequently used apps in your primary memory and least ones like videos photos images in secondary

Which term refers to a fact that naturally occurs in the universe?
A.
scientific law
B.
scientific inquiry
C.
conclusion
D.
hypothesis

Answers

Answer: a scientific law

Explanation:

It’s A.Scientific law

Which type of document would be best created in Word? HELLP!!!!
Spreadsheet

Resume

Presentation

Animation

Answers

Answer:

presentation

Explanation:

because maths

Answer:

I think spreadsheet

Explanation:

Please correct me if I am wrong!

Please help!! Thank youu

Answers

Pinky I think?!!????
i think it’s B: first

because if you’re right handed then it’s most likely for your first finger to touch those highlighted areas!

people with healthy media diets:
A.do not have problems with addictions, obesity, or other health issues
B. make good choices about what media to use and when not to use them
C. do not eat while engaging in media and avoid unnecessary weight gain
D. choose to leave media and technology out of their lives entirely

Answers

Answer:

b

Explanation:

Does anyone know how to use a while loop and ask a user to input positive integers until the user enters 0 and print the sum so far after each input, then print final sum at the end in edhesive?

Answers

In python:

total = 0

while True:

   num = int(input("Enter a number: "))

   if num == 0:

       break

   total += num

print(f"The final sum is {total}")

Which of the following may be purposes of packaging?
O Help the product stand out from the competition
O Make the product easier to use
O Protect the product and the people who buy it
O All of the above

Answers

JakauehahshvasuwvevaiN

Answer:

D

Explanation:

Mary is writing an article about the animal kingdom. She wants to place an image below the text. Which menu should Mary choose for this purpose?

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

This question is about how to insert caption or text below the image. Marry have to follow the following steps:

Open the article in MS WordSelect the image to insert the text below it.Then go to the References menuUnder the reference group, click on the insert caption buttona popup, windows will get open, fill in it the required detail.

If you want to insert the image below the text, then you have to follow the following option.

Select the text where you want to insert the imageGo to insert menUnder the Illustration group of menu, click on pictures button, or online pictures button and select the image and click ok.

Mary needs to choose the REFERENCE menu in order to place the text in a desired fashion around the image.

HERES A RIDDLE!!

What is more useful when it’s broken??

Answers

Answer:

an egg

Explanation:

Which statements describe the use of sound in presentations?

Sound cannot be used in presentation programs.
Sound can distract the audience when it is overused.
Sound can only be used with transitions.
Sound can only be used with animations.
Sound can be used with both animations and transitions.

Answers

Answer:

b and e

Explanation:

The statements that best describe the use of sounds in the presentation are as follows:

Sound can distract the audience when it is overused.Sound can be used with both animations and transitions.

Thus, the correct options for this question are B and E.

What do you mean by Presentation?

The Presentation may be defined as the type of process through which an individual who is known as the speaker conveys information on a particular topic to the number of people known as the audience.

As normally sound makes the presentation more attractive and understandable but the excess sound in the presentation makes the mood of the audience saturated and finally distracts. A standard level of sound must be required in both animations and transitions to make the presentation more influencing one.

Therefore, the correct options for this question are B and E.

To learn more about the Advantages of presentations, refer to the link:

https://brainly.com/question/11972945

#SPJ2

HOW MEANY PEOPLE PLAY AMONG US

Answers

Answer:

up to 1.5 million people are playing Amoung Us

Explanation:

Answer: I Play Among Us But this is a website for learning and questions so please ask that somewhere else. Thank You Have A Nice Day!

Explanation:

Consider the following numeric values.

Binary 1011
Binary 1101
Decimal 5
Decimal 12
Which of the following lists the values in order from least to greatest?

Answers

Answer:

d 5, b 1011, d 12, b 1101

Explanation:

If you convert the binary, 1011 is 11 and 1011 is 13.

The ordered list of values from least to greatest is Decimal 5, Binary 1011, Decimal 12, and Binary 1101.

Binary refers to the numbers consisting of only "0" (zero) and "1" (one), while decimals are digits from "0" to "9".

In computation, binary numbers are used in order to store any type of data, these numbers consist of binary digits (bits).

A sequence of binary numbers must be read in a digit-by-digit manner, conversely to decimal numbers, which are read by ten, hundred, etc.

The decimal numbers can be estimated as the sum of the binary numbers times their power of 2 (2n).

In conclusion, the ordered list of values from least to greatest is Decimal 5, Binary 1011, Decimal 12, and Binary 1101.

Learn more in:

https://brainly.com/question/16612919

Jeff took a picture of his dog that he wants to include in his paper titled “Rescue Dogs of Florida.” What tab should Jeff choose to place the picture in his document?

Home
Insert
Layout
View

Answers

Insert use the insert tab then click pictures and insert pic

Answer:

insert

Explanation:

Film directors generally earn more money than theater directors. True False

Answers

Yes, it’s true they earn more. Film directors earn between $250,000 to 2 million per project. New directors typically earn between $250,000 to $500,000 per film, while film directors earn about $1 million per movie.
Theatre directors in the UK earn on average £10,759 a year from their craft- well below the £27,000 take home annual salary national average- with some directing jobs paying less than £1 an hour, new research has revealed.

Answer:

Yes, it's true on edge 2022.

Which of the following actions is most likely to raise legal or ethical concerns?
A
An analyst writes a program that scans through a database of open-access scientific journals and creates a document with links to articles written on a particular topic.
Sut
B
A computer scientist adds several features to an open-source software program that was designed by another individual.
с
A musician creates a song using samples of a copyrighted work and then uses a Creative Commons license to publish the song.
D
A public interest group alerts people to a scam that involves charging them for a program that is available for free under a Creative Commons license
Q

Answers

Answer:

C. A musician creates a song using samples of a work and then uses a Creative Commons license to publish the song.

Explanation:

Copyright law can be defined as a set of formal rules granted by a government to protect an intellectual property by giving the owner an exclusive right to use while preventing any unauthorized access, use or duplication by others.

A copyright can be defined as an exclusive legal right granted to the owner of a creative work (intellectual property) to perform, print, record, and publish his or her work. Also, the owner is granted the sole right to authorize any other person to use the creative work. The copyright law which protects the sharing and downloading rights of music is known as the Digital Millennium Copyright Act (DMCA).

Furthermore, an intellectual property can be defined as an intangible creation of the human mind, ideas, thoughts or intelligence.

In this scenario, a musician creates a song using samples of a copyrighted work and then uses a Creative Commons license to publish the song. This is an action that is most likely to raise legal or ethical concerns because he didn't get a license from the other musicians who he used their work.

A Creative Commons license is simply a public copyright license that allows for the free distribution of a copyright protected material and it can only be used by the intellectual property owner.

what is marc railberts goal for the robots his company (Boston Dynamics) builds?

Answers

Answer:

. We wanted to build a robot that could go where people go

Explanation:

1. What is JavaScript?
2. Who designed the Apple 1 Computer?
3. Who founded Apple?

Help me, it would be a pleasure if you could.

Answers

Answer:

1. JavaScript is a dynamic computer language used to primarily code and create system functions.

2. The people who designed the Apple 1 Computer were

Steve WozniakSteve Jobs

3. The founder of Apple was Steve Jobs. He passed away from pancreatic cancer.

Hope this helps you!

critics of media consumption
A. do not believe we should do away with media altogether
B. agree that our society would be better off without media
C. argues that all media is a deterrent to the growth of society
D. do not want obese children to use technology and media

Answers

Answer:

b

Explanation:

make me brainlyest plzz

sorry if i got it wrong

Answer:

b i think

Explanation:CHECK IT FIRST

Why is file extension important when naming the file

Answers

Answer:

Extensions are important because they tell your computer what icon to use for the file and what application can open the file

Explanation:  For example, the doc extension tells your computer that the file is a Microsoft Word file.

5 steps in cleaning and sanitizing smokehouse​

Answers

Answer:

Scrape or remove food bits from the surface. Wash the surface. Rinse the surface. Sanitize the surface. Allow the surface to air-dry.

Explanation: These are steps for cleaning and sanitizing.

The steps in cleaning and sanitizing smokehouse include:

Scrape or remove food bits from the surface.Wash the surface.Rinse the surface.Sanitize the surface.Allow the surface to air-dry.

Sanitization simply refers to the disinfection and cleaning of an area. This is vital on order to prevent humans from being infected or contaminated.

When sanitizing a smokehouse, it's essential to remove food bits from the surface, wash the surface. rinse the surface, sanitize the surface and then allow the surface to air-dry.

Read related link on:

https://brainly.com/question/18996117

What is an enterprise system

Answers

Answer:

Explanation:

Enterprise system is a cross- functional information system that provides organization-wide coordination and integration of the key business processes. Enterprise system helps in planning the resources of an organization.

HELP HELP BRAINLIEST A student learns that a classmate is being cyberbullied. He wonders if it is a serious situation and how it is affecting his classmate.

What areas of his classmate’s life may be impacted by cyberbullying? Check all that apply.

physical health
recent memories
school performance
emotional health
athletic ability

Answers

Answer:

physical health

school performance

emotional health

Which of the following BEST describes the differences between sequential and event-driven programming?

Answers

Answer:

In sequential programming, commands run in the order they are written. In event-driven programming, some commands run in response to user interactions or other events.

Explanation:

Event-driven program : A program designed to run blocks of code or functions in response to specified events.

Sequential programming: The order that commands are executed by a computer, allows us to carry out tasks that have multiple steps. In programming, sequence is a basic algorithm: A set of logical steps carried out in order.

The missing options are;

A) In sequential programming commands run one at a time. In event-driven programming all commands run at the same time.

B) In sequential programming commands run faster than in event-driven programming.

C) In sequential programming each command is run many times in sequence. In event-driven programming all commands are run a single time as an event.

D) In sequential programming commands run in the order they are written. In event-driven programming some commands run in response to user interactions or other events.

This question is about sequential programming and event-driven programming.

Option D is correct.

To answer this question, we need to first of all define what the two terminologies in computer programming are;

Event-driven programming; This is a programming pattern whereby the program flow is determined by a sequence of events that arise from activities/interaction of the user or the system.

Sequential programming: This is a programming pattern whereby the program flow is determined by the sequence in which it was written.

Looking at the given options, the only one that fits perfectly into the description I have given above about sequential and event-driven programming is Option D.

Read more at; brainly.com/question/17970226

Jennifer works as a programmer. She has fixed certain bits of code in a program while developing it. She has purposely left specific code in the program so she can access the program later and obtain confidential information. Which programming threat has she created?
A. logic bomb
B. trap door
C. Trojan horse
D. virus

Answers

Answer:

B. trap door

Explanation:

It's also referred to as the back door

jordan needs to create an employee handbook. the handbook will have several written pages with bold text, plain text, and numbered lists. jordan should use a (n)
A) Spreadsheet
b) database
c) e-mail
d) word processor

Answers

D

is most likely the correct answer

Which Call of Duty game is the best?
A. Black Ops 1-4
B. Modern Warfare 1-4
C. Infinite Warfare
D. Advanced Warfare
E. Ghosts
F. WWII

Answers

Answer:

i like ghost and modern 3

Explanation:

Other Questions
why does the author use the phrase "spark of hope" in a long walk to water and what does it mean? Read this excerpt from The History of the Peloponnesian War by Thucydides.Our constitution does not copy the laws of neighbouring states; we are rather a pattern to others than imitators ourselves. Its administration favours the many instead of the few; this is why it is called a democracy. If we look to the laws, they afford equal justice to all in their private differences; if no social standing, advancement in public life falls to reputation for capacity, class considerations not being allowed to interfere with merit; nor again does poverty bar the way, if a man is able to serve the state, he is not hindered by the obscurity of his condition. The History of the Peloponnesian War, ThucydidesBased on the excerpt, what is one reason Thucydides wrote this passage?He wanted to explain why the Greeks copied other groups forms of government.He wanted to explain how other civilizations imitate the Greek form of government.He wanted to describe how Greek law favors those who were born to more nobler classes of people.He wanted to explain how democracy works in Greece as compared to other forms of government. pls hury Explain how the states were represented under the Articles of Confederation. Given the following diagram, enter the required information. How would you counter the fat man's argument (that his son was fortunate to have died young)? Jose needs to enclose a rectangular section of his yard. The perimeter of the section is 27 feet, and the area is 35 square feet. Find the length and width of the section. Part II: The equation for area is A = LW. Substitute the expression you found for W in Part I into the area equation. Then, if the area is equal to 35 square feet, write the equation in standard form with a, b, and c as whole numbers. how does energy transfer between objects What is the theoretical probability that you will roll a sum of 6? What is the volume, in cubic units, of therectangular box shown below? Which facts about yeoman farmers does this passage discuss? Check all that apply. What makes Washingtons central and eastern geographic regions unique? Simplify 3(2a - y) - 4(2y - a). How is technology a mode of revealing? Plzzzz hurryWhich statements describe teachings of Islam? Choose four correct answers.Muslims must worship many gods.Muslims must give to those in need.The Sunna provides an example for how to live.Muhammad is a prophet of Allah,The Qur'an contains the exact words of Allah. which statement explains one way that minerals form? o they are mined from rocks. o they are produced from molten minerals. o they are grown in a laboratory. o they are washed up on a seashore. HURRY IM TIMED!!!!!!!! 4. The value of y is directly proportional to the value of x. If y = 45 when x = 180, what is the value of y when x = 80? Which of the following is NOT true about making connections? A. Making connections will take too much time to make it worth doing. B. Making connections will help you draw conclusions from a text. C. Making connections will help you remember the text better. D. Making connections makes it easier to read a text. What does Croatoan mean? Which of the following is a common characteristic among economies of the southern colonies SOMEBODY PLEASE HELP ME! I DONT UNDERSTAND