11/12 totally lost


#1

public class EqualityOperators {
public static void main(String[] args) {
boolean A = (4 > 2);
boolean B = (5 > 2);
System.out.println(A == B);


https://www.codecademy.com/en/courses/learn-java/lessons/introduction-to-java/exercises/equality-operators?action=resume


Replace this line with your code.


#2

HI why are you lost?


#3

I have tried everything changed it 10 times, and still cant figure out... I have the boolean values with is true, and the equality value which is a == b


#4

The instruction are very clear
..Do not declare any variables.


#5

I obviously dont understand the "Do not declare any variables" then or how not to, or specially what is meant by it


#6

here

boolean A = (4 > 2);
boolean B = (5 > 2);
System.out.println(A == B);

so if they aske you do not declare any variable it will be like that

System.out.println(A == B);

then where you put A and B you will put (4 > 2) (where you put A) and (5 > 2) (...B)


#7

public class EqualityOperators {
public static void main(String[] args) {
System.out.println(4>2 == 5>2);

still not working boolean values still has to be there i guess? like this

boolean (A) = 4 > 2;
boolean (B) = 5 > 2;
System.out.println(4>2 == 5>2);

still not working :>


#8

Just put this line

System.out.println(4>2 == 5>2)

if it doesn't work can you take a screenshot of your code


#9

still doenst work


#10

hi you didn't close the public class EqualityOperators and public static void main(String[] args)

public class EqualityOperators {
    public static void main(String[] args) {
         //here put the System.out.println(4>2 == 5>2)
    }   
}

#11

true == true :slight_smile:


#12

I'm also completely stuck - I did everything recommended in this forum and I still can't get past this question.
@dataplayer45933 did you manage to get it right? If so - how?


#13

@vixy96

  1. Go here https://discuss.codecademy.com/c/learn-java/introduction-to-java
  2. Use the + New Topic button
  3. Fill out the template
  4. Someone will help

#14

Stuck also :confused:


#15
  1. Go here https://discuss.codecademy.com/c/learn-java/introduction-to-java
  2. Use the + New Topic button
  3. Fill out the template
  4. Someone will help

#16

Nevermind :slight_smile:


#17

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