When Java was designed by James Gosling (then of Sun Microsystems), he took a gr
ID: 3801306 • Letter: W
Question
When Java was designed by James Gosling (then of Sun Microsystems), he took a great deal of inspiration from C and C++. For this question, we will compare C to Java. Previous knowledge of either is not necessary. C is very focused on pointers. Function Pointers have a notoriously difficult syntax - for example: int (*Operation(int)). Implementing the same thing in Java looks like this: Function Operation. This is an improvement of _________ In older C implementations, variables had to be declared at the top of the function before any code. This means that you have to break your flow of thought to cursor back to the top of the function to add variables. In Java, variables can be declared anywhere before they are used. This improves _____ In C, structs, unions, typedefs and enums were all used to create new types. In Java, all of these are replaced by "class". Rather than creating a grab bag of "all of the features", Gosling decided to opt for _____ In C, a struct (think of a struct as a members only, all public class) can be returned from a function, but an array can not. In Java, a function/method can return any type. Java, in this example, has more _______ Java support information hiding in classes (public, private, protected). C has very little in the way of information hiding. Java added more support for ______. Java adds exceptions which enable error handling of unexpected run time situations better than C. This is an example of _____ Both C and Java have very exact specifications. This is an example of _______ A Well-Defined B. Readability C. Reliability D. Abstraction E. Writability F. Simplicity G. OrthogonalityExplanation / Answer
1. F. Simplicity
2., B. Readability
3. G. Orthogonality
4. E. Writability
5. D. Abstraction
6. C. Reliability
7. A. Well defined
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.