Issue With Vocareum Lab Compiler Not Compiling Simple Lines of Code

Jump to solution
Seth9000
Community Novice

I'm enrolled in the Amazon Technical Academy prep course and we have to use the Vocareum IDE to do our assignments.

My code fragment for an assignment (which must be submitted in 3 steps by updating a method in each step) is at step 1. It requires an update the first function below simply won't compile. The simpleConditional() method takes a int argument and returns a string variable as shown below:

public String simpleConditional(int price) {

String answer = null;

// TODO: Write Step 1 code between the forward slashes

if(price<20) {

answer = "Buying new shirt";

}

//

return answer;

}

Did everything the step was requiring i.e. add the two lines of code. Even git initialized, staged and committed the repository with updates. But still get the same build error result?

Error message states: 3 tasks, 2 executed, 1 up to date.

Just want to know if there is something missing by means of syntax and/or obvious logical error that is prohibiting the code from compiling?? This works FINE on other Java IDE platforms like Java SE, VS and VSC.

Labels (1)
0 Likes
1 Solution
Chris_Hofer
Community Coach
Community Coach

Hello @Seth9000 ...

You have posted your question in the global Canvas Community website and not within your course.  We can help answer questions you may have about the Canvas LMS (Learning Management System), but we wouldn't be able to necessarily provide help with your assignments/homework.  I would highly suggest you reach out to your instructor to ask specifics about this particular assignment.  You can contact your instructor directly in Canvas by checking out these instructions:

How do I get help with Canvas as a student?

Good luck as you have these conversations with your instructor!

View solution in original post

0 Likes