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
laila [671]
3 years ago
9

What is the output of the following code? public class Test { public static void main(String[] args) { String s1 = new String("J

ava"); String s2 = new String("Java"); System.out.print((s1 == s2) + " " + (s1.equals(s2))); } }
Computers and Technology
1 answer:
Darya [45]3 years ago
6 0

Answer:

false true

Explanation:

In the code snippet, two string objects are created in java with the value Java.

The print method first checks the condition s1==s2 and outputs false, This is so because the operator == which is used for equality in other primitive data types like ints cannot be applied to the String data type. In the second part of the print function, the equals function s1.equals(s2) is used and it prints true since the two string are equal

You might be interested in
What should the timing of transition slides be per minute?
PolarNik [594]

How Many Slides to Use in a Presentation and for how long?

In the past if you asked a presentation skills “pundit” you were likely to hear “one slide per minute,” but times are changing and I don’t think the answer is as simple as a certain number of slides per minute. A presentation slide is supposed to be on for 15 seconds and stop to ask if anyone has any questions, if you are explaining something or reading alond with the slide it could be as long as you want it to be.

5 0
3 years ago
Read 2 more answers
Let's play Silly Sentences!
Mrac [35]

Answer:

Grace sat quietly in a stinky stadium with her blue jacket

Grace jumped on a plane to Paris.

Grace ate bananas, apples, and guavas quietly while she listened to the news.

Grace is the name of a major character in my favorite novel

Grace was looking so beautiful as she walked to the podium majestically.

Grace looked on angrily at the blue-faced policeman who blocked her way.

3 0
3 years ago
Blogs may refer to any kind of communication over the internet is true​
Sliva [168]

Answer:

Yes It's true but You forgot email

Explanation:

6 0
3 years ago
The efficiency and effectiveness of a logistics/supply chain operation are constrained by the location of plants and warehouses
Vika [28.1K]

Answer:

True.

Explanation:

7 0
3 years ago
Your older brother Max tells you about his secret plan to hack into his college’s computer network and change all of his grades.
viktelen [127]

Answer:

Tell him he could get kicked out of school and it can possibly show up on his record and lessen his chances of finding a job since no one will trust him. He should just focus and get his grades up instead of risking everything and "taking the easy way out".

Explanation:

6 0
2 years ago
Other questions:
  • TLO 06 Active Directory Domain and Trusts tool is used to move servers between site in an AD Infrastructure.a. Trueb. False
    14·1 answer
  • which one of these steps describe saving a newly created file. click on the save icon. minimize the file. name the file. select
    12·2 answers
  • What is the main purpose of cutting plane line arrows?
    7·1 answer
  • nswer the following questions concerning chapter 1:1.1 Which pair of layers are NOT peer layers?a.Transport layer in the sender
    9·1 answer
  • How can an administrator make only the files and folders to which a user has at least Read permissions visible?
    13·1 answer
  • Return the "centered" average of an array of ints, which we'll say is the mean average of the values, except ignoring the larges
    6·1 answer
  • A string with delimiters can be parsed into separate fields using the _____ class.
    8·1 answer
  • 1. Se requiere implementar un conversor unipolar que tendrá una tensión analógica variable entre 0 y 2 V pico. Deberá tener una
    10·1 answer
  • You want to draw a rectangle over the moon you added to your slide and then move it behind the moon. You want it to look like a
    15·1 answer
  • What is the<br>Way to<br>keep the tool<br>Screw​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!