Lesson 11 in introductory to Java(Equality operators)


#1

What is wrong with my code?

System.out.printIn(true == false);


#2

Hi @arrayninja91652,

You have …

System.out.printIn(true == false);

Note the I in printIn. It should be l.


#3

replay I’m having the same error, also I’d like to know how you guys got past lesson 9 and 8 idk why but i was having errors there.


#4

Add me on Skype(redarrow9876) we could do this course together.

As for lesson 8:

They are asking you the set the int(integer) variable
myNumber equal to the product of two numbers. Product means multiplication ,so it would go something like this…

int myNumber= 4*2;

You could use any number.

As for lesson 9:

The modulo operator returns the remainder after dividing two numbers, eg. 5/2 will return 1 because 2 can go into 5 twice but it has a remainder of 1.

They ask you to set the myRemainder variable equal to 2, so basically you have to divide two numbers using the modulo operator to return a remainder of 2.

int myRemainder = 12%10;


#5

your equation did work but I’ve tried int myRemainder = 10 % 8; (14 % 12) and others that has been unsuccessful.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.