Error on exercise 11


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-java/lessons/conditionals-control-flow/exercises/generalizations-conditionals?action=resume

<In what way does your code behave incorrectly? Include ALL error messages.>

There is insufficient memory for the Java Runtime Environment to continue.

Cannot create GC thread. Out of system resources.

An error report file with more information is saved as:

/home/ccuser/workspace/java-hello-java/hs_err_pid14.log

```

public class GeneralizationsB {
public static void main(String[] args) {

// ( 3 >= 3 && !(true || true) )
boolean tricky = false;	

if(2 < 1) {

		System.out.println("Stuck in the past...");

	}else {

		System.out.println("Upgraded to the future!");

	}


int subwayTrain = 5;

	switch (subwayTrain){

		case 1 : System.out.println("This is a South Ferry bound train!");
							break; 
		case 5 : System.out.println("This is a Brooklyn bound train!");
							break;
		case 7 : System.out.println("This is a Queens bound train!");
							break;
		default:
			System.out.println("I'm not sure where that train goes...");

	}

}

}

<do not remove the three backticks above>

I don't understand this error message?
#2

i had the same readout for last 2 hours and can’t get anything done. i’m only on Conditionals, 2, Boolean Operators.
Getting this so I can’t continue :

There is insufficient memory for the Java Runtime Environment to continue.

Cannot create GC thread. Out of system resources.

An error report file with more information is saved as:

/home/ccuser/workspace/java-hello-java/hs_err_pid14.log

i only have simplest code entered:
public class And {
public static void main(String[] args) {

	System.out.println(4<5&&6<9);
	
}

}


#3

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