Fendadis John has Published 52 Articles

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

How to add a YouTube Video to your Website?

Fendadis John

Fendadis John

Updated on 16-Jun-2020 08:20:41

902 Views

To add a YouTube Video to your website, you need to embed it. To embed a video in an HTML page, use the element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropriately.The Video URL ... Read More

Java variable declaration best practices

Fendadis John

Fendadis John

Updated on 15-Jun-2020 05:46:54

2K+ Views

Following are the best practices while declaring a variable.Variables names should be short or long enough as per the scope. For example, loop counter variable, i is fine whereas employee as a loop variable.Specific words should not be used as equals, compare, data.Use meaningful names which can explain the purpose ... Read More

How to set the shape of the border of the top-right corner with JavaScript?

Fendadis John

Fendadis John

Updated on 23-May-2020 10:08:48

259 Views

To set the shape of the border of the top-right corner in JavaScript, use the borderTopRightRadius property. Set border radius using this property.ExampleYou can try to run the following code to learn how to set the shape of the top-right border with JavaScript.Live Demo           ... Read More

How to convert String to Boolean in JavaScript?

Fendadis John

Fendadis John

Updated on 20-May-2020 08:55:35

308 Views

You can try to run the following to learn how to convert String to Boolean in JavaScript.ExampleLive Demo           Convert String to Boolean                var myString = "Amit";          document.write("Boolean : " + Boolean(myString));          

Advertisements