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
Help please not trying to fail
deff fn [24]

Answer:

B. Everywhere CFCI is not

8 0
3 years ago
Select the correct answer.
ss7ja [257]
The answer a identifying portfolio goal
8 0
3 years ago
Read 2 more answers
Whats happens when you add the numbers 1 and 1 together (1+1)<br> 11<br> 32<br> 2<br> 9
Neko [114]

Answer:

2

Explanation:

The mathematical answer would be 2. To get 11, one would simply put the 1's next to each other but there is an addition symbol. 32 is an irrational number to think of for an answer because there are no other numbers to add or multiply with the 1's to achieve 32. 9 is also irrational for the same reason.

6 0
2 years ago
In 2-3 sentences, explain to another student why shortcuts are beneficial. Include details about shortcuts that you have used.
Kipish [7]

Answer:

Explanation:

Keyboard Shortcut Examples

crtl + esc = open start menu

alt + tab = switch apps

ctrl + z = undo

Shortcuts basically help everything occur in a quicker form . They help make the task easier .

3 0
3 years ago
Read 2 more answers
What happens once the Insert tab is used in PowerPoint to insert a chart into a presentation?
nordsb [41]

Answer:

•The user can edit the chart directly. hoped i;m right

Explanation:

6 0
3 years ago
Other questions:
  • Write a program that will ask the user to input a phrase (multiple word sentence), and an integer value. A static function will
    14·1 answer
  • Select the correct answer.
    6·1 answer
  • printArray is a function that has two parameters. The first parameter is an array of element type int and the second is an int,
    10·1 answer
  • _______ tools enable people to connect and exchange ideas.
    7·2 answers
  • An application programming interface (API) is ________. Select one: A. the code to interface between an application and RAM B. t
    15·1 answer
  • Which model allows you to make subsystems in parallel?
    12·1 answer
  • Scott is an aspiring software developer. During an interview for a new job, his prospective employer asks what kind of program h
    12·1 answer
  • Estoy haciendo codificación en este momento es tan confuso y no estar en la escuela es más difícil
    11·2 answers
  • Explain how communication facilitate cordination​
    14·1 answer
  • When James added a date field to a PivotTable, Excel grouped the date values into quarters, months, and years. He does not want
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!