Matrix
In Mathematics, matrix is a 2-dimensional rectangular array which is filled either with numbers or symbols or expressions as its elements & has a row and column 1) Java Program for Matrix Addition,Subtraction & Multiplication :
In Mathematics, matrix is a 2-dimensional rectangular array which is filled either with numbers or symbols or expressions as its elements & has a row and column 1) Java Program for Matrix Addition,Subtraction & Multiplication :
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)
Armstrong Number is a number that equals to the sum of its digits, each raised to a power. Armstrong number was discovered by mathematician Michael Frederick Armstrong (1941-2020) and is also known as narcissistic or Plus Perfect or pluperfect number. Armstrong numbers form the OEIS sequence A005188. Example : For one-digit : 1: 1^1 = 12: 2^1 = 23: 3^1 = 3 So,1,2 & 3 are one-digit Armstrong Number
Prime Number is a number greater than 1 and divided by 1 or itself only. Prime number can be divided only by itself or 1 and not by any other number. 0 and 1 are not a Prime Number and 2 is the only even Prime Number. Example of Prime Number : 2, 3, 5, 7,
For a String if the reverse of a String is the same as the original String, then that String is called a Palindrome String Example : Malayalam For a Number if the reverse of a Number is equal to the same Number, then that number is called a Palindrome Number Example : 4554, 1221 Following
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
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
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
Java Keywords Java keywords are the reserved words which have a predefined meaning to the Java compiler. These predefined words cannot be used as a variable or object name or class name and if we use it we will get a compile error. List of Java Keywords : abstract: It is used to declare an
Access Modifiers In Java defines the scope of data member,variable,method class or constructor specifing security, accessibility of those elements based on access modifiers used. Four types of Access Modifiers in Java are Private,Default,Protected and Public Private: Access of a private modifier is only within the class and cannot be accessed from outside the class. Default: