Programmer Coding

Java

Recursion in Java

Recursion in java is a process in which a way(method)  calls alone continuously. A way(method)  in java that                             calls alone is called recursive way(method) . Java Recursion Example 1: Factorial Number public class Example { static int factorial(int n){ if (n == 1) return 1; else return(n * factorial(n-1)); } } public static void main(String[] […]

Recursion in Java Read More »

Entrance Control

Entrance Modifiers in java There are two types of modifiers in java: entrance modifiers and non-entrance modifiers. The entrance modifiers in java specifies entranceibility (scope) of a data member, way(method) , createror class. There are 4 types of java entrance modifiers: 1. private 2. default 3. protected 4. public 1) private entrance modifier The private

Entrance Control Read More »

Scroll to Top