Assignment 3
Assignment 3
1. TRUE 2. FALSE
3. TRUE 4. TRUE
5. FALSE 6. To create an array object, you specify the type of the array elements and the number of elements as part of an array-creation expression that uses keyword new. Such an expression returns a reference that can be stored in an array variable. Ex: int [] g = new int[10];
7. The enhanced for statement iterates through the elements of an array without using a counter, thus avoiding the possibility of stepping outside the array. 8. A type followed by an ellipsis (...) in a methods parameter list indicates that the method receives a variable number of arguments of that particular type. 9. A static method cannot access non-static class members, because a static method can be called even when no objects of the class have been instantiated. 10. To establish stream connection in java, the protocol used is TCP (Transfer Control Protocol)