Explain Platform?

Any hardware or software environment in which a program runs, is known as a platform. Java has a runtime environment (JRE) and API, So it is also called as platform.

Read More

What is ‘IS-A’ relationship in java?

‘is a’ relationship is also known as inheritance. We can implement ‘is a’ relationship or inheritance in java
using extends keyword. The advantage or inheritance or is a relationship is re-usability of code instead of
duplicating the code.

Example : Motor cycle is a vehicle
Car is a vehicle Both car

Read More

Explain Java Coding Standards for variables ?

  1. Variable names should start with small letters.
  2. Variable names should be nouns.
  3. Short meaningful names are recommended.
  4. If there are multiple words every inner word should start with Uppercase character.

Example : string, value, empName, empSalary

Read More

What is Multi-threading in Java?

Multi-threading is a Java feature that allows concurrent execution of two or more parts of a program. Each part of such program is called a thread. So, threads are light-weight processes within a process.

Threads can be created by using two mechanisms :

  1. Extending the Thread class
  2. Implementing the Runnable Interface

Thread creation by

Read More

Explain Java Coding Standards for Constants?

Constants in java are created using static and final keywords.

  1. Constants contains only uppercase letters.
  2. If constant name is combination of two words it should be separated by underscore.
  3. Constant names are usually nouns.

Example : MAX_VALUE, MIN_VALUE, MAX_PRIORITY, MIN_PRIORITY

Read More

Explain Java Coding standards for Methods?

  1. Method names should start with small letters.
  2. Method names are usually verbs
  3. If method contains multiple words, every inner word should start with uppercase letter.
  4. Method name must be combination of verb and noun

    Example : toString(), getCarName(), getCarNumber()

Read More