For each one of the following statements about Java, indicate whether or not it
ID: 3788108 • Letter: F
Question
For each one of the following statements about Java, indicate whether or not it is also true for Smalltalk. If a statement is not true for Smalltalk, explain why not.
(a) Java is normally implemented using a hybrid implementation system.
(b) Data in Java is divided into two categories: primitive types and reference types.
(c) Variables in Java must have a declared type.
(d) Java relies on garbage collection to reclaim memory occupied by objects that are no longer in use.
(e) Java’s classes are part of a single class hierarchy.
(f) Java supports only single inheritance, not multiple inheritance.
Explanation / Answer
Answers-
(A) NO,general methods of implementing a programming language are Compilation, Pure Interpretation, Hybrid Implementation.Although Smalltalk supports 3 fundamental futures of object oriented programming but not all the feature so it is not hybrid implemented.
(B) NO,Java has primitive types like int and float whose representation and behavior are different from complex objects.In Smalltalk every thing, is an object
(C)NO,Smalltalk is extremely dynamic. All types are identified at runtime
(D)YES,Smalltalk support garbage collection.
(E)NO,Since classes are objects, and every object is an instance of a class, it follows that classes must also be instances of classes. A class whose instances are classes is called a metaclass. Whenever you create a class, the system automatically creates a metaclass for you. The metaclass defines the structure and behavior of the class that is its instance
(F)YES,smalltalk support only single inheritence for commercial purposes.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.