How to call abstract class methods in Java

An abstract is a method prototype(means return type,method name,list of parameters)without any implementation,Implementation is provided by subclass or subclasses of the class.To create an abstract method, simply specify the modifier “Abstract” followed by the method declaration and replace the method by a semicolon.

Write a program to add subtract multiply and divide two integer using switch statement

The switch statement is a multi way decision making statement in which we can select only one .Switch statement starts with “switch” keyword like (switch(expression)).Switch defines one or more case values which we known as case labels.Case labels consists of case keyword followed by colon(:),every case terminated by break statement.

Program to Compute sum of digits of a given number in Java

The Scanner class is in java.util packagewhich is used to allows the user to read values of various types(task of getting input from the user).If we can use Scanner class then we must use(import) this package.

How to get class information using Java

Instances(object) of this class encapsulate the run time state of an object in a running Java application.This allow us to retrieve information about the object(object of class) runtime.

Pass Array to Method in Java

Same as we can pass primitive type(int s,float d) values to methods, we can also pass arrays(homogeneous data) to a method.To pass an array to a method(function), specify the name of the array without any square brackets(like display(data)) within the method call.


Page 8 of 20