Fendadis John has Published 98 Articles

Different ways for Integer to String conversion in Java

Fendadis John

Fendadis John

Updated on 21-Jun-2020 12:40:05

Following are the different ways to convert an Integer to String in Java.Using Integer.toString(int) − Convert an int to String using static toString() method of Integer class.String b = Integer.toString(125);Using String.valueOf(int) − Convert an int to String using static valueOf() method of String class.String b = String.valueOf(125);Using new Integer(int).toString() − ... Read More

Difference between JDK, JRE and JVM in Java

Fendadis John

Fendadis John

Updated on 21-Jun-2020 12:33:05

JVM or Java Virtual Machine is a specification to provide the runtime environment in which a bytecode can be executed. JVMs are prepared platform specific and are available for almost all the hardware and machine.JRE is the implementation of JVM and contains libraries and other files which are used by ... Read More

Deque interface in Java

Fendadis John

Fendadis John

Updated on 21-Jun-2020 12:26:34

java.util.Deque interface is a subtype of java.util.Queue interface which supports insertion and removal of elements at both ends.Interface Declarationpublic interface Deque extends QueueArrayDeque ClassThe java.util.ArrayDeque class provides resizable-array and implements the Deque interface. Following are the important points about Array Deques −Array deques have no capacity restrictions so they grow ... Read More

Default array values in Java

Fendadis John

Fendadis John

Updated on 21-Jun-2020 12:11:58

Java provides a data structure, the array, which stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type. When ... Read More

What is the use of SOUNDS LIKE operator in MySQL?

Fendadis John

Fendadis John

Updated on 20-Jun-2020 13:04:03

With the help of SOUNDS LIKE operator, MySQL search the similar sound values from the table.SyntaxExpression1 SOUNDS LIKE Expression2Here, both Expression1 and Expression2 will be compared based on their English pronunciation of sound.ExampleFollowing is an example from ‘student’ table which will match the two expressions based on the pronunciation of ... Read More

How to use REPLACE() function with column’s data of MySQL table?

Fendadis John

Fendadis John

Updated on 20-Jun-2020 10:52:56

For using it with column’s data we need to provide column name as the argument of REPLACE() function. It can be demonstrated by using ‘Student’ table data as follows −Examplemysql> Select Id, Name, Subject, REPLACE(Subject, 's', ' Science') from Student WHERE Subject = 'Computers'; +------+--------+-----------+-----------------------------------+ | Id   | Name ... Read More

What MySQL EXPORT_SET() function returns if any of the argument is NULL?

Fendadis John

Fendadis John

Updated on 20-Jun-2020 08:57:06

MySQL EXPORT_SET() function would return NULL if any of the argument provided in it is NULL. Following examples would demonstrate it −Examplemysql> Select EXPORT_SET(NULL, 'Y', 'N', ', ', 4); +----------------------------------+ | EXPORT_SET(NULL, 'Y', 'N', ', ', 4) | +----------------------------------+ | NULL                 ... Read More

How to add two or more strings in MySQL?

Fendadis John

Fendadis John

Updated on 20-Jun-2020 08:18:58

A string function called CONCAT() is used to concatenate two or more strings as a single string in MySQL.SyntaxCONCAT(String1, String2, …, StringN)Here, the arguments of CONCAT functions are the strings which need to be concatenated as a single string.Examplemysql> Select CONCAT('Ram', 'is', 'a', 'good', 'boy') AS Remarks; +---------------+ | ... Read More

How can we use WHERE clause with MySQL INSERT INTO command?

Fendadis John

Fendadis John

Updated on 20-Jun-2020 06:17:22

We can use conditional insert i.e. WHERE clause with INSERT INTO command in the case of new row insertion. It can be done with following ways −With the help of dummy tableIn this case, we insert the value from dummy table along with some conditions. The syntax can be as ... Read More

What is the difference between MySQL TRUNCATE and DELETE command?

Fendadis John

Fendadis John

Updated on 20-Jun-2020 06:02:15

As we know that TRUNCATE will remove all the rows without removing table’s structure from the database. Same work can be done with the help of DELETE command on removing all the rows from the table. But there is a significant difference of re-initialization of PRIMARY KEY AUTO_INCREMENT between both ... Read More

Advertisements