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
Katena32 [7]
3 years ago
11

Write a program that does the following:

Computers and Technology
1 answer:
Nataly_w [17]3 years ago
8 0

Answer:

Following is the program in Java language:

import java.util.*;//import package

public class Main // main class

{

public static void main(String[] args) // main method

{

    String  firstname,lastname; // Declare the two String variables

    Scanner ob=new Scanner(System.in); // create a object of scanner //class

    System.out.println("Enter the first name:");  // Prompt the user for // enter the first name

   firstname=ob.nextLine();// Read in the first name by user

    System.out.println("Enter the last name:"); // Prompt the user for last //name

   lastname=ob.nextLine();// Read in the last name by user

   System.out.println("Hello " + firstname +' ' +lastname); // print the //firstname,lastname

}

}

Output:

Enter the first name:

San

Enter the last name:

ert

Hello San ert

Explanation:

Following are the description of program

  • Declared two variable of string type i.e "firstname"  and "lastname".
  • Create a instance or object  of scanner class .i.e "ob".
  • Prompt the user to enter the first name in the  "firstname" variable
  • Read in the first name by the user by using the method nextLine() in the first name variable
  • Prompt the user to enter the  last name.
  • Read in the last name by the user by using the method nextLine() in the lastname variable.
  • Finally, print the first name and last name.

You might be interested in
Shut down and unplug the computer. Remove the CPU case lid. Locate the various fans, and then use
nlexa [21]

Answer:

Cleaning the fan

Explanation:

Just did it on Ed

Would you mind giving me brainliest?

6 0
3 years ago
A(n) _________________________ is a character that word displays on the screen but is not visible on a printed document.
oksano4ka [1.4K]
Nonprint ...but im like 99 percent sure
6 0
3 years ago
What features are needed in a mobile to make it a business solution?
ad-work [718]

Answer:

Connectivity, Security, Productivity

Hope this helps;)

6 0
3 years ago
Write a function that takes a list as a parameter, converts every element in the list to integar and then returns a tuple compri
abruzzese [7]

Answer:

Following is given the solution of your question as required.

All the necessary descriptions are given in form of comments,

Sample output are also shown.

I hope it will help you!

Explanation:

6 0
3 years ago
Indicate whether the following statements are true or false:
postnew [5]

Answer:C

Explanation:I got it correct on the computer

7 0
3 years ago
Read 2 more answers
Other questions:
  • Say our confusion matrix is as follows, calculate precision, recall, and accuracy. Interpret the results for the positive class.
    10·1 answer
  • The series of events that make up a story is called
    6·2 answers
  • If a speed mismatch was configured between two Cisco routers' Ethernet interfaces, what would the status of this interface be?
    12·1 answer
  • Which of the following commands would you use to start the program Main with four strings? a. java Main arg0 arg1 arg2 arg3 b. j
    11·1 answer
  • Who all likes fortnite
    15·2 answers
  • Giving Brainliest IFFF CORRECT
    9·1 answer
  • Writing in Java, write a program that prompts the user to input an integer and then outputs both the individual digits of the nu
    15·1 answer
  • Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If th
    5·1 answer
  • Write a method that returns a String that is just the first and last character of the given string Your return value should be o
    8·1 answer
  • Activity 1.1.4 What is Technology?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!