- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Karthikeya Boyini has Published 2383 Articles
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
72 Views
The method Integer.lowestOneBit() returns an int value with at most a single one-bit, in the position of the lowest-order ("rightmost") one-bit in the specified int value.Here we have a decimal value 294, whose binary is −100100110The lowest one bit is calculated using the lowestOneBit() method in Java.Example Live Demopublic class Demo ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
759 Views
To check for Integer overflow, we need to check the Integer.MAX_VALUE with the multiplied integers result, Here, Integer.MAX_VALUE is the maximum value of an integer in Java.Let us see an example wherein integers are multiplied and if the result is more than the Integer.MAX_VALUE, then an exception is thrown.The following ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
925 Views
The following is our byte array.byte[] b = new byte[]{'p', 'q', 'r'};We have created a custom method “display” here and passed the byte array value. The same method converts byte array to hex string.public static String display(byte[] b1) { StringBuilder strBuilder = new StringBuilder(); for(byte val : b1) ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
2K+ Views
The following is the syntax to check whether a table is empty or not using MySQL EXISTS −SELECT EXISTS(SELECT 1 FROM yourTableName);ExampleFirst, let us create a table. The query to create a table is as follows −mysql> create table ReturnDemo -> ( -> Id int, -> Name ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
10K+ Views
To convert integer to boolean, firstly let us initialize an integer.int val = 100;Now we will declare a variable with primitive boolean. While declaration, we will initialize it with the val value comparing it with an integer using the == operator. If the value matches, the value “True” is returned, ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
132 Views
To perform XOR on a set of Booleans, firstly let us consider the following Boolean array.boolean[] arr = { true, true, false };Let us now create a nested loop and within that perform XOR operation.for (boolean one : arr) { for (boolean two: arr) { // ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
5K+ Views
To check for Integer overflow, we need to check the Integer.MAX_VALUE, which is the maximum value of an integer in Java.Let us see an example wherein integers are added and if the sum is more than the Integer.MAX_VALUE, then an exception is thrown.Example Live Demopublic class Demo { public static ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
161 Views
The following is an example displaying the maximum of three integer values.Example Live Demopublic class Demo { public static void main(String[] args) { int val1 = 10; int val2 = 20; int val3 = 30; System.out.println("Number 1 = ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
3K+ Views
Every data type in Java has a minimum as well as maximum range, for example, for Float.Min = 1.4E-45 Max = 3.4028235E38Let’s say for Float, if the value extends the maximum range displayed above, it leads to Overflow.However, if the value is less than the minimum range displayed above, it ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
karthikeya Boyini
13K+ Views
To display Boolean type, firstly take two variables and declare them as boolean.boolean val1, val2;Then one by one assign values to both of them, one of them is shown below −val1 = true;Now, use if statement to check and display the Boolean true value.if(val1) System.out.println("This is true and will get ... Read More