identifiers in java

In this article, we are going to discuss about identifiers. Identifiers are the names given to variables, methods/functions, classes, interfaces. For example:- int number=1231; String str=”identifiers in java”; In the above example “number” and “str” are the identifiers. Rules for identifiers in java:- There are some rules for declaring identifiers in java. if identifiers are … Read more

keywords in java

In this article, we are going to discuss about keywords in java. Keywords are predefine words in programing language. we cannot use these keywords as variable names because they are already predefined. Java keywords:- These are some java keywords written below. You cannot use these keywords as a identifiers in your programs. goto keyword is … Read more

what is java ?

In this article, we are going to discuss the advantages of java what is java? uses of java advantage of java disadvantage of java etc. History of java:- java is one of the famous programming languages. it was developed by “James Gosling” in 1995 at sun microsystems. The development of java starts in 1991. This … Read more

Digits after decimal

In this article, we are going to find digits after decimals in given number. for this, we will write a java code. Example:- if n=145.258, then the output will be 258. Steps:- Java code to find digits after decimal numbers:- Output:- The same logic can be used to find digits after decimals in other programming … Read more

binary to decimal

In this article, we are going to see how we can convert binary to decimal. We also write java code to convert binary to decimal. Binary to Decimal conversion:- Steps:- Java code to convert binary to decimal:- Output:- The same logic can be used to convert binary to decimal in other programing languages like C, … Read more

decimal to binary

In this article we are going to see how we can convert decimal to binary. We also write java code to convert decimal to binary. Decimal to Binary conversion:- For conversion of Decimal to Binary continuously divide the decimal number by 2 until decimal number become 0. and add every reminder after division at the … Read more

string palindrome in java

In this article, we are going to discuss about palindrome string and write a code in java to check whether a given string is palindrome or not. Palindrome String:- A palindrome string is a string that remains the same after reversing the string for example-“abc”, this is not a palindrome string because after reversing the … Read more

power using recursion

In this article, we are going to find power of given number using recursion in java. Example:- if num=2 and power=3, then the output will be 8. steps:- java code to calculate power using recursion:- Output:- You can use the same approach to calculate the power using recursion in other programming languages like C, C++, … Read more

Swap two numbers

In this article, we are going to swap two numbers by using two different approach. first approach is using third variable and second one is without using third variable. Swapping two numbers using third variable. In this approach, we used a temporary i.e. third variable two swaps two numbers. Here we are going to use … Read more