What is a computer ?

Computer Definition A computer is a electronic device that accepts information and manipulates it or data. It has the ability to store, retrieve, and process data.   The term computer is derived from the Latin term “computare“, it means that It is a calculate machine or programmable machine. Computer can not do anything without a […] Continue reading →

Prime Number in Java

Write a Program in Java of Prime Number. Prime Number :- A number is called prime number if its not divisible by any number other than 1 or itself and you can use this logic to check whether a number is prime or not.   import java.util.*; class Prime { public static void main(String args[]) […] Continue reading →

Twisted Prime Number

Write a Program in Java of Twisted Prime Number. Twisted Prime Number :- If a number is prime, and its reverse number is also prime, then it is called Twisted prime number. For Example :- 37 is prime number , and its reverse order is 73 and 73 is also prime number.   import java.io.*; […] Continue reading →

Function In Java

Function/Method Methods are also known as Procedures or Functions: Procedures: They don’t return any value. Functions: They return value. Definition of Function: A program module used simultaneously at different instances in the program is called function or method . A function/method is a type of procedure or routine. A function in a programming language is […] Continue reading →

Operators in Java

Operators In Java Operators are symbols that are used to perform some operations on the operands.They are used to manipulate primitive Data types.Combination of operands and operators are known as expression.Java provides a rich set of operators to manipulate the variables.There  are three types of operators in Java. 1. Unary operators 2. Binary operators 3. […] Continue reading →

Modifiers in Java

 Modifiers in java There are two types of modifiers in java. 1.Access modifiers 2.Non-access modifiers. 1.Access modifiers Java provides a number of access modifiers to set access levels for classes, variables, methods and constructors. The four access levels are: Visible to the package is No modifiers are required. Visible to the class only (private). Visible […] Continue reading →

Literals in Java

Java Literals Literal is also known as constant. A literal is a constant value which is compatible to a data type, a literal is used to assign a value to variable, to compare values or define constants. There are many types of constants (literals). They are: Boolean literals Integer literals Floating literals Character literals String […] Continue reading →

Variable in Java

Variable in Java Variable is a name of memory location. Variables are used to hold the value. Example int data=50; //Here data is variable Types of Variable There are three types of variables. 1.Local variable 2.Instance variable 3.Static variable 1.Local variable: A variable that is declared inside the method is called local variable 2.Instance variable: […] Continue reading →

Data Types in Java

Data Types When we create a variable in the program then we reserve some space in the memory. So, Data types are used to allocate memory to a variable. By assigning different data types to variables, we can store integers, decimals or characters in the variables.The following should be understood for every Data type: 1. […] Continue reading →
Page 1 of 42123456»102030...Last »