
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2310 Articles

Samual Sam
5K+ Views
Use the valueOf() method to convert boolean value to Boolean. Firstly, let us take a boolean value.boolean val = false;Now, to convert it to Boolean object, use the valueOf() method.Boolean res = Boolean.valueOf(val);Let us now see the complete example to convert boolean value to Boolean.Example Live Demopublic class Demo { ... Read More

Samual Sam
239 Views
To convert an Integer to a boolean, we have taken the following Integer objects.Integer one = 1; Integer two = 1; Integer three = 0;We have taken nested if-else statement to display the true or false values. Here, the value “one” is the same as “two” i.e. 1; therefore, the ... Read More

Samual Sam
294 Views
Underflow occurs when the given value is less than the maximum prescribed size of a data type. The underflow condition can result to an error or now the implementation of the programming language handles it on its own.To display underflow of datatypes, I have taken an example of double datatype. ... Read More

Samual Sam
10K+ Views
The Equals() method compares this object to the specified object. The result is true if and only if the argument is not null and is an Integer object that contains the same int value as this object.Let us first set Integer object.Integer val1 = new Integer(30); Integer val2 = new ... Read More

Samual Sam
324 Views
Use the parseInt() method with the second parameter as 8 since it is the radix value. The parseInt() method has the following two forms.static int parseInt(String s) static int parseInt(String s, int radix)To convert octal to decimal, use the 2nd syntax and add radix as 8, since octal radix is ... Read More

Samual Sam
397 Views
Use the toHexString() method to convert decimal to hexadecimal. The method returns a string representation of the integer argument as an unsigned integer in base 16. The following characters are used as hexadecimal digits:0123456789abcdef.The following is the syntax.String toHexString(int i)It has only single parameter.i − This is an integer to ... Read More

Samual Sam
118 Views
The Integer.rotateLeft() method returns the value obtained by rotating the two's complement binary representation of the specified int value i left by the specified number of bits. The following is the syntax.int rotateLeft(int i, int distance)Here are the parameters.i − This is the int value.distance − This is the rotation ... Read More

Samual Sam
109 Views
The method returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified int value. Let us now see the syntax.int reverseBytes(int i)The following is the parameter.i − This is the int valueExample Live Demopublic class Demo { public static void main(String ... Read More

Samual Sam
2K+ Views
A string object can be created in Java using the string literal.String myStr = “Amit”;Another way to create a string object is using the new keyword.String myStr = new String("Hello!");We have used the first method to create a string object.String str = "true";Now, use the valueOf() method to convert String ... Read More

Samual Sam
20K+ Views
To read integers from console, use Scanner class.Scanner myInput = new Scanner( System.in );Allow a use to add an integer using the nextInt() method.System.out.print( "Enter first integer: " ); int a = myInput.nextInt();In the same way, take another input in a new variable.System.out.print( "Enter second integer: " ); Int b ... Read More