8. For each one of the following statements about Java, indicate whether or not
ID: 3788013 • Letter: 8
Question
8. 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 Java, 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
(a)Answer True
Reason:The hybrid implementation is possible only by utilizing the interfaces.
(b)Answer True
Reason: The primitive data type straightly contains the values .they are 8 types i.e long,short,int,byte,boolean,char,float,double
(c)answer True
Reason: it specifies the size and instance of variables memory.
data type variable =value;
int x=10;
(d)answer True
Reason: generally memory allocated to objects using 'new' operator ,and deleting an allocated memory is uncommon .The automatic deletion of already allocated but unused memory is called as garbage collection. it is quicker than the manual memory management .reallocating the memory is also possible
(e)Answer True
(f) Answer True
Reason: Java allows only one parent class .Therefore ,it does not support multiple inheritance.to some extent ,the features of multiple inheritance are acheived using interfaces.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.