Author name: Admin

Factorial

There are different ways to calculate factorial of number in Java. Following four programs illustrate Java program to calculate factorial of number using loop, iteration, recursion & ternary operator. 1) Simple Java program to calculate Factorial of a number using loop : 2) Java program to calculate Factorial of a number using Iteration : 3)

Factorial Read More »

Fibonacci Series

Number series in which next number is the sum of previous two numbers is called Fibonacci Series Example : 0, 1, 1, 2, 3, 5, 8, 13, etc. Fibonacci Series in Java can be written in following two ways : 1) Without Recursion2) With Recursion Following two programmes illustrate Fibonacci Series Using Recursion & without

Fibonacci Series Read More »

Method

Java Method Method in Java is a block of code which is used to execute specific tasks for which it is written and return the result to the caller.A Java method can perform some specific task without returning anything.It is used for code reusability and also increases code readability. It also allows to break program

Method Read More »

Naming Convention

Java Naming Convention Java naming convention is a set of rule to follow to name the identifiers such as class,variable,package,constant, method, etc. Java follows CamelCase naming convention for writing names of methods, variables, classes, packages, and constants.It consists of compound words or phrases such that each word or abbreviation begins with a capital letter or

Naming Convention Read More »

Scroll to Top