Explain what is meant by primitive, and explain the difference between primitive and reference variables?
in the java collections framework, state the main difference between a linkedList and an arrayList.Also give the name of the interface that these two classes implement.
What is the class which each other class in ultimately a descendant(subclass) of? Name two of its methods and their purpose.
What does it mean to catch and exception? Explain the circumstance where this might be needed.
explain why we might need to provide our own implementation of the toString method when writing a class and what might happen if we didnt
Explain what is meant by the term Cohesion in relation to each of these
you may like to make use of a class named Student to help explain your answer.(Assume this class defines a range of attributes, including :name , ID number, Degree, campus, email address.)
When writing a subclass of existing class,depending on the visibility specification of methods and attributes of the existing original class,the subclass may or may not be able to access or use the members of the original class.
the various type of exception(Checked or unchecked.
Explain why we might need to use a Wrapper class. Describe an example of where you might use a wrapper class.
We use a wrapper class to further simplify the process of using the class being wrapped. For example, we have System.in class which is to stream inputs from the keyboard. If we want to read a string, there is no such method in the System.in to do it so we have to build our own way of reading string using the System.in. However, to make it easier we can just wrap it with a Scanner class the use the methods in the scanner class to read strings, integers, decimals, and so on. The scanner class will take care of how things will get done.
When dealing with files, we can open a filein append mode.What does this mean in each of the following two cases?
what is the meaning of the following keywords
Java provides a mechanism called exception Handling.
If we want to have an ArrayList of integer numbers(e.g monthly rainfall totals, what is the way that we declare a suitable variable to refer this list, and what is the way to create the new empty list,ensuring that only integers will be able to be added to the list later on?
What is an abstract data type? Provide a reason why you might choose to use this?