This is a variable that uses the word final. If you try to modify it, you will get a runtime error. -
ANS-JAVA Concepts: What is a class constant's equivalent?
A static variable is initiated once for the entire class, and it is mutable. - ANS-JAVA Concepts:
What are static variables?
Static methods can be used without instantiating an object, and they can use static variables. A
use case would be a math library. - ANS-JAVA Concepts: What are the use cases of static
methods?
Both abstract and non-abstract methods. static methods, and a constructor. It just can't be
instantiated. - ANS-JAVA Concepts: What kind of methods can an abstract class have?
Trick question: an interface doesn't have any methods, it just defines what methods must be
implemented as a prototype for the class implementing said interface. - ANS-JAVA Concepts:
What kind of methods can an interface have?
Where you inherit from more than one class. Java technically does not support it, but it
approximates it with interfaces. - ANS-JAVA Concepts: What is multiple inheritance? Does Java
support it?
Final, non-final, static, and non-static variables. - ANS-JAVA Concepts: What kind of variables
can an abstract class have?
You can only create static and final variables in an interface, since no instance can exist. -
ANS-JAVA Concepts: What kind of variables can an interface have?
Yes - ANS-JAVA Concepts: Can an abstract class implement an interface?
No, they provide prototypes for what methods a class that implements them must implement. -
ANS-JAVA Concepts: Can an interface implement an abstract class?
The constructor of the parent class is called, then the constructor of the class is called. -
ANS-JAVA Concepts: What happens when you instantiate an object that extends some parent
class of that child class's type?
No, a copy of a pointer is passed instead of the pointer itself. - ANS-JAVA Concepts: if you pass
in a variable to a function and modify there, is it changed outside the function?