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
lakkis [162]
3 years ago
15

Give two separate print statements: one will print your name, the other will print your major. Ensure that both will print on th

e same line to the screen
Computers and Technology
1 answer:
Alexus [3.1K]3 years ago
4 0

Answer:

// here is code in java.

// import package

import java.util.*;

// class definition

class Main

{

   // main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

      // print the name

       System.out.print("my name is Sam. ");

       // print the major

       System.out.print("my major is CS.");

   }catch(Exception ex){

       return;}

}

}

Explanation:

In java, System.out.print() will print the statement but didn't go to the next line.If there is another System.out.print(), then it will also print into the same line.So here first the System.out.print() will print the name and second will print the major in the same line.

Output:

my name is Sam. my major is CS.

You might be interested in
Type dig www.example A in order to get the IP address of www.example. What’s the TTL of the A record returned in the response? W
fiasKO [112]

Answer:

Your computer now has the IP address of that website cached, and no longer has to lookup the IP address of that domain name. The TTL of the first query is bigger than the TTL of the second query as less time was taken to execute the request.

Explanation:

On the first request to the website, the computer needs to contact other machines to find the record of the IP address.

On the second request, the computer already has the IP address and can use that to connect.

6 0
3 years ago
What is the first step in finding a solution to a problem?
Law Incorporation [45]

Answer:

Can i have a points? Tysmm

5 0
3 years ago
Read 2 more answers
Which website can help you find antivirus software ?
sergey [27]

If you have windows you have Windows Defender Installed already!!

5 0
3 years ago
The algorithm for solving the problem of average of five (5) numbers​
PilotLPTM [1.2K]

Answer:

Explanation:

Denote the five numbers as a, b, c, d and e.

The average is:

(a + b + c + d +e) ÷ 5.

Easily:

Learn how to do input and output operations in your programming language of choice.

Learn what average is (see Arithmetic mean - Wikipedia)

Learn how to code arithmetic operations in your PL of choice.

Put all that together and code the program.

Oh, did you expect the code snippet? Sorry, I don’t do peoples’ homework for them on principle. Homework is for you to learn something. If you can’t be bothered, accept that you’ll fail your class. If you want to pass, LEARN.

3 0
3 years ago
When saving a memo you created in Word, which of the following extensions is automatically assigned to the document?
Lena [83]
.docx is the default file extension on a Word doc.
6 0
3 years ago
Read 2 more answers
Other questions:
  • When the packet leaves the router, which source and destination ip addresses will be contained in the packet?
    9·1 answer
  • The final element of an e-mail message should be
    15·1 answer
  • What is a step by step procedure written to carry out a task?
    11·1 answer
  • Which evaluation factor will be most important when choosing technology for the company
    5·1 answer
  • Is it safe to take apart a computer monitor?
    13·1 answer
  • For the questions below, consider a class called ChessPiece. This class has two instance data, String type and int player. The v
    13·1 answer
  • URGENT!!! Steve wants to change shooting and exposure settings while on his photo shoot. Which camera part will allow him to do
    12·2 answers
  • What is a benefit of naming cells and ranges?
    8·2 answers
  • What is the main circuit board inside the computer called?CD-ROMY
    12·1 answer
  • All Office programs have similar commands on the tab for changing the document view a. File b. View c. Locate d. display ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!