
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
215 Views
Using toString() method to convert Short to string. Firstly, let us take a short primitive datatype and initialize a short value.short myShort = 55;Now let us include this value to the following Short object.Short s = new Short(myShort);Convert the above given Short to string using the toString() method as shown ... Read More

Samual Sam
298 Views
Use the parseShort() method to convert String to short primitive. It parses the string argument as a signed short.Firstly, we have set a string.String str = "99";Now, we have taken a short primitive and included the string value.short val = Short.parseShort(str);The following is an example to convert String to short ... Read More

Samual Sam
303 Views
To compare two Byte Arrays, use the Arrays.equals() method. Here we have declared and initialized a total of 4 arrays.byte[] arr1 = new byte[] { 11, 13, 30, 45, 77, 89 }; byte[] arr2 = new byte[] { 12, 13, 34, 87, 99, 33}; byte[] arr3 = new byte[] { ... Read More

Samual Sam
1K+ Views
To convert a byte to hexadecimal equivalent, use the toHexString() method in Java.Firstly, let us take a byte value.byte val1 = (byte)90;Before using the method, let us do some more manipulations. Mask the byte value now:int res = val1 & 0xFF;Let us now see the complete example and use the ... Read More

Samual Sam
11K+ Views
To check whether a character is in Lowercase or not in Java, use the Character.isLowerCase() method.We have a character to be checked.char val = 'q';Now let us use the Character.isLowerCase() method.if (Character.isLowerCase(val)) { System.out.println("Character is in Lowercase!"); }else { System.out.println("Character is in Uppercase!"); }Let us see the complete ... Read More

Samual Sam
213 Views
If you use COUNT(*) around the LEAST() then MySQL scans at least one index, therefore avoid LEAST(COUNT(*)) and use LIMIT.Let us first create a table. The query to create a table is as follows −mysql> create table ReturnDemo -> ( -> Id int, -> Name varchar(10) -> ); Query OK, ... Read More

Samual Sam
138 Views
To convert int to boolean, let us first take the following int.int one = 1; int two = 1; int three = 0;We have 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 following works −else ... Read More

Samual Sam
2K+ Views
To understand the GROUP BY and MAX on multiple columns, let us first create a table. The query to create a table is as follows −mysql> create table GroupByMaxDemo -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> CategoryId int, -> Value1 int, ... Read More

Samual Sam
210 Views
To get the minimum value of datatype int in Java, use the following −Integer.MIN_VALUETo get the maximum value of datatype int in Java, use the following −Integer.MAX_VALUELet us now implement this in our example.Example Live Demopublic class Demo { public static void main(String[] args) { int val1 ... Read More

Samual Sam
3K+ Views
Let us first create a table −mysql> create table OrderDemo -> ( -> OrderId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> OrderPrice int, -> OrderDatetime datetime -> ); Query OK, 0 rows affected (0.66 sec)ExampleNow you can insert some records in the table using insert ... Read More