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
marta [7]
2 years ago
6

What is the difference between = and == in terms of java..?

Computers and Technology
2 answers:
Mkey [24]2 years ago
7 0

Answer:

= is used more for define a variable so int Data = 1;

Where == is used to show if something is equal too.

exp of == would be

int Data1 = 1;

int Data2 = 2;

if(Data1 == Data2)

{

System.out.println("Hi")

}

else

System.out.println("Not Equal");

//Output

Not Equal

//Reason was they didnt equal and the boolean was false not true.

Explanation:

Hope this helped!

sukhopar [10]2 years ago
3 0

= is for assignment, == is for comparison.

So x=2 means: assign the value 2 to the variable x.

and

x==2 means: is variable x equal to 2, yes or no?

You might be interested in
Write a void function SelectionSortDescendTrace() that takes an integer array, and sorts the array into descending order. The fu
salantis [7]

Answer:

See explaination

Explanation:

#include <iostream>

using namespace std;

void SelectionSortDescendTrace(int numbers[], int numElems) {

int maxInd;

for (int i = 0; i < numElems - 1; ++i) {

maxInd = i;

for (int j = i; j < numElems; ++j) {

if (numbers[j] > numbers[maxInd]) {

maxInd = j;

}

}

int temp = numbers[i];

numbers[i] = numbers[maxInd];

numbers[maxInd] = temp;

for (int j = 0; j < numElems; j++) {

cout << numbers[j] << " ";

}

cout << endl;

}

}

int main() {

int numbers[10];

int numElements = 0;

for (int i = 0; i < 10; i++) {

cin >> numbers[i];

if (numbers[i] == -1)

break;

++numElements;

}

SelectionSortDescendTrace(numbers, numElements);

return 0;

}

8 0
3 years ago
You are setting up a small network. The customer has decided to change his internet service provider (ISP) to EtherSpeed. The IS
salantis [7]

Home pc1 becouse it is the right one

3 0
2 years ago
NWhen you measure a person’s weight, you are measuring the
MAVERICK [17]

Answer:

gravitational force acting on that person.

Explanation:

5 0
3 years ago
Read 2 more answers
What dose a bios system do?
ANTONII [103]
BIOS instructs the computer on how to preform basic functions such as booting and keyboard control. It is also used to identify and configure the hardware in a computer
4 0
2 years ago
Read 2 more answers
What are the uses of computer in educational setting?
Arada [10]

Answer:

Quick Communication & Correspondence

Explanation:

Another main advantage of using computers in the education field is the improvement in the quality of teaching-learning process and communication between students & teachers. For this, they use Microsoft PowerPoint to prepare electronic presentations about their lectures.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is are example of an engineered item?
    12·1 answer
  • Notes page view and Outline view are found in the<br> tab.<br> File<br> O Status<br> View<br> Page
    8·1 answer
  • Write a memo to the vice president, outlining the steps an employee might have taken to create an e-mail message and make it app
    15·1 answer
  • Instructions
    12·1 answer
  • The term Electronic Privacy Information Center (EPIC) refers to a form of the digital subscriber line technology, which enables
    6·1 answer
  • Please help me complete this task for ICT! Its about Hardware and Software
    12·1 answer
  • Big films with big budgets typically have a few animators working on them. True False
    11·1 answer
  • What is the disadvantage of server based network?
    7·2 answers
  • The ____ attribute can be used only with input boxes that store text. Group of answer choices type pattern required value
    9·1 answer
  • true or false You are able to change the formatting of a table after it is inserted into a placeholder.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!