Since this days I’m spending lots of time doing programming in Java, I decided to make this page as a central repository of the more basic concepts in Java programming language that I will be updating over time.
Q: What is an object?
A: Objects are entities in your program that you manipulate by calling methods.
Q: What is a class?
A: A class defines the methods that you can apply to an object.
Q:What is a method?
A: A Java method is a set of Java statements which can be included inside a Java class.
Q: What is a constructor?
A: The process of creating a new object is called a construction.
Q: What is a variable?
A: A variable is a storage location in the computer’s memory that has a type, name, and content.
Q: What is a getter method?
A: A getter method whose purpose is to get the value of an instance or class value.
Q: What is a setter method?
A: A method whose purpose is to set the value of an instance or class value.
Q: What are some of the data types?
A: int, String, double, long, boolean.
Q: What is the main method of a Java program?
A: public static void main ( String [] args )
Q: what is Overloading?
A: Overloading is the ability to define more than one method with the same name in a class. When one of the methods is called the compiler uses their method signatures to be able to distinguish between them.
Q: What is an interface?
A: A Java interface declares a set of methods and their signatures.
Q: What is Polymorphism?
A: Polimorphism denotes the principle that behivors can vary depending on the actual type of an object.
Q: What is inheritance?
A: Inheritance is the ability to define a new class using an existing class as the basis.
Q: What is the difference between a superclass and a subclass?
A: The more genaral class is called SuperClass. The more specialized class that inherits from the superClass is called SubClass.
Q: What is toString method used for?
A: Define the toString method to yield a string that defines the object state
Q: What is cohesion?
A: Cohesive means that a certain class performs a set of closely related actions.
Q: What is an Accessor?
A: Methods that return variables. The accessor method name should start with “get”.
Q: What is a Mutator?
A: Methods that alter variables. The mutator method name should start with “set”.
Q: What is inheritance?
A: is the ability to define a new class using an existing class as the basis.
Great site!
Thanks