Which lines of code would correctly set up an array of 5 Sandwich objects and create the first Sandwich object within the array? (We're pretending that we have already created a Sandwich "template" class with a Constructor that takes zero parameters.)
Sandwich[ ] sandwiches = new Sandwich[5];
Sandwich[0] = sandwiches;
Sandwich sandwiches = new Sandwich[5];
sandwiches[0] = new Sandwich();
Sandwich [ ] sandwiches = new Sandwich[5];
Sandwich[5] = new sandwiches [ ];
in java
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here