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]
3 years ago
6

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

Computers and Technology
2 answers:
Mkey [24]3 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]3 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
Compute the approximate acceleration of gravity for an object above the earth's surface, assigning accel_gravity with the result
Zepler [3.9K]

Answer:

The summary of the given query would be summarized throughout the below segment. The output of the question is attached below.

Explanation:

Given values are:

  • G = 6.673e-11
  • M = 5.98e24
  • accel \ gravity = 0
  • dist\ center=float(inp())

here,

inp = input

By utilizing the below formula, we get

⇒ \frac{GM}{d^2}

Now,

⇒ accel \ gravity=\frac{G\times M}{dist \ center**2}

⇒ print("Acceleration of gravity: {:.2f}".format(accel_gravity))

6 0
3 years ago
_______ is malware that encrypts the user?s data and demands payment in order to access the key needed to recover the informatio
Phoenix [80]
Ransomware is the malware that encrypts the users data
4 0
3 years ago
Beth wants to add information to her PowerPoint presentation that is hidden from her audience and only she will
Veseljchak [2.6K]

Answer:

howdy

Explanation:

4 0
4 years ago
Convertbinary(111100)to decimal​​​​
Ugo [173]

Answer:

60

Explanation:

Step 1: Write down the binary number:

111100

Step 2: Multiply each digit of the binary number by the corresponding power of two:

1x25 + 1x24 + 1x23 + 1x22 + 0x21 + 0x20

Step 3: Solve the powers:

1x32 + 1x16 + 1x8 + 1x4 + 0x2 + 0x1 = 32 + 16 + 8 + 4 + 0 + 0

Step 4: Add up the numbers written above:

32 + 16 + 8 + 4 + 0 + 0 = 60.

So, 60 is the decimal equivalent of the binary number 111100.

8 0
3 years ago
Read 2 more answers
. Constructors can / cannot (circle correct choice) be called explicitly as if they were regular member functions.
Sunny_sXe [5.5K]

Answer:

Constructor can be called as explicitly, when the compiler create the nameless and temporary object and then it get immediately get destroyed. As constructor is the special type of function which typically creates the instance of class.

The special member function in the constructor can be called as explicitly by the programmer. The main purpose of the constructor is initializing the object of the class while executing the code in the method for performing various task.

3 0
3 years ago
Other questions:
  • List three reasons you might use hwinfo when troubleshooting and upgrading a computer
    10·1 answer
  • The inner planets are called terrestrial because they
    11·2 answers
  • How to turn off new macbook pro when it is frozen 2017
    11·2 answers
  • In python:
    8·1 answer
  • A sample containing 4.30 g of O2 gas has an initial volume of 13.0 L. What is the final volume, in liters, when each of the foll
    5·1 answer
  • 6. Which of the following is malware? (1 point)
    10·2 answers
  • Zack is taking a survey that contains questions about his future plans. Which question would most likely be on the survey?
    9·2 answers
  • What is the name for unwanted software that installs when you click some links?
    13·2 answers
  • In your opinion, why did Proponents<br>of IPs used IPV6 instead of IPv5​
    7·1 answer
  • Can someone help me explain Nvm scheduling in operating systems?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!