Fendadis John has Published 39 Articles

What are the advantages, disadvantages and restrictions of using MySQL triggers?

Fendadis John

Fendadis John

Updated on 22-Jun-2020 11:50:53

5K+ Views

We must have to understand the advantages, disadvantages, and restrictions of using MySQL triggers so that we can use it effectively.AdvantagesFollowings are the advantages of using MySQL triggers −Integrity of data − With the help of MySQL trigger we can check the integrity of data in the table. In other words, ... Read More

How MySQL SUM() function evaluates if it is used with SELECT statement that returns no matching rows?

Fendadis John

Fendadis John

Updated on 22-Jun-2020 05:09:31

254 Views

When MySQL SUM() function used with SELECT statement that returns no matching rows then there is nothing to evaluate and it returns NULL as output. Sometimes, we thought it must return 0 as output but 0 is a number itself and for no matching rows it not significant to return ... Read More

Generating OTP in Java

Fendadis John

Fendadis John

Updated on 21-Jun-2020 15:00:56

5K+ Views

Generate OTP is now a requirement on most of the website now-a-days. In case of additional authentication, system generates a OTP password adhering to OTP policy of the company. Following example generates a unique OTP adhering to following conditions −It should contain at least one number.Length should be 4 characters.Exampleimport ... Read More

Flexible nature of java.lang.object

Fendadis John

Fendadis John

Updated on 21-Jun-2020 14:35:44

260 Views

The java.lang.Object class is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.Class DeclarationFollowing is the declaration for java.lang.Object class −public class ObjectClass constructorsSr.No.Constructor & Description1Object()This is the Single Constructor.Class methodsSr.No.Method & Description1protected Object clone()This method ... Read More

Floating point operators and associativity in Java

Fendadis John

Fendadis John

Updated on 21-Jun-2020 14:24:45

637 Views

Following programs shows the float arithmetic can cause dubious result if integer values are used using float variables.Examplepublic class Tester {    public static void main(String[] args) {       float a = 500000000;       float b = -500000000;       float c = 1; ... Read More

Different ways for Integer to String conversion in Java

Fendadis John

Fendadis John

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

485 Views

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

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

Fendadis John

Fendadis John

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

239 Views

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

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

Fendadis John

Fendadis John

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

7K+ Views

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

How to get the difference between two arrays in JavaScript?

Fendadis John

Fendadis John

Updated on 18-Jun-2020 08:23:34

325 Views

To get the difference between two arrays in JavaScript, try to run the following code. Here, we’re using some method like split(), indexOf(), sort(), etc to get the elements, which aren’t the same in both the arrays &mnus;ExampleLive Demo           JavaScript Dates         ... Read More

Advantages and Disadvantages of the TCP/IP Model

Fendadis John

Fendadis John

Updated on 17-Jun-2020 12:44:08

31K+ Views

The advantages of TCP/IP protocol suite areIt is an industry–standard model that can be effectively deployed in practical networking problems.It is interoperable, i.e., it allows cross-platform communications among heterogeneous networks.It is an open protocol suite. It is not owned by any particular institute and so can be used by any ... Read More

Advertisements