Akshaya Akki has Published 46 Articles

Java String comparison, differences between ==, equals, matches, compareTo().

Akshaya Akki

Akshaya Akki

Updated on 26-Dec-2024 20:42:19

907 Views

When working with strings in Java, one of the most common operations is comparing strings to check for equality or ordering. Java provides several methods to perform string comparison: equals(), matches(), and compareTo(). While all of them are used to compare strings, each method serves a different purpose and behaves ... Read More

Java program to find the percentage of uppercase, lowercase, digits and special characters in a String

Akshaya Akki

Akshaya Akki

Updated on 22-Aug-2024 12:11:06

1K+ Views

This article will teach us how to transform a string into an array of characters in order to examine its composition. Next, we shall categorize every character as a numeric, special character, lowercase letter, or uppercase letter. The methods of Java Character class will be used to do this. For each ... Read More

How to compile a java program

Akshaya Akki

Akshaya Akki

Updated on 12-Sep-2023 02:07:51

35K+ Views

Compiling a Java program is very easy after JDK installation. Following are the steps −Open a command prompt window and go to the directory where you saved the java program. Assume it's C:\.Type 'javac MyFirstJavaProgram.java' and press enter to compile your code. If there are no errors in your code, ... Read More

How to return the day of the week in the specified date according to universal time?

Akshaya Akki

Akshaya Akki

Updated on 23-Jun-2020 08:13:52

134 Views

JavaScript date getUTCDay() method returns the day of the week in the specified date according to universal time. The value returned by getUTCDay() is an integer corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.ExampleYou can try to run the following ... Read More

What is the role of source RegExp property in JavaScript?

Akshaya Akki

Akshaya Akki

Updated on 23-Jun-2020 08:02:06

150 Views

The source RegExp property in JavaScript is a read-only string property of RegExp objects. It contains the text of the RegExp pattern. This text does not include the delimiting slashes used in regular-expression literals, and it does not include the "g", "i", and "m" attributes.ExampleYou can try to run the ... Read More

How can we drop a MySQL view from the database?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 13:43:50

158 Views

With the help of DROP VIEW statement, we can drop a MySQL view from the database. Its syntax would be as follows −SyntaxDROP VIEW [IF EXISTS] view_name;Here view_name is the name of the view which we want to delete from the database.ExampleSuppose if we want to drop a view named ... Read More

How can we create a MySQL one-time event that executes after some specified time interval?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 12:28:53

292 Views

As we know a one-time event means the events that will be executed only once on a particular schedule. To illustrate the creation of such kind of events we are using the following example in which we are creating an event which will execute after some specified time interval −Examplemysql> ... Read More

How does MySQL evaluate the expression if the arguments are not equal in NULLIF()?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 07:28:19

127 Views

As we know that MySQL NULLIF() control flow function will return the first argument both the arguments are not the same. The first argument is returned because MySQL evaluates the first argument twice if both of the arguments are not the same.Examplemysql> Select NULLIF('Tutorialspoint', 'MySQL'); +----------------------------------+ | NULLIF('Tutorialspoint', 'MySQL') | ... Read More

What MYSQL INTERVAL() function returns if there is no bigger number in the list of arguments than the number at first argument?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 06:43:37

108 Views

In this case, MySQL INTERVAL() function returns the index number of the last number in argument list plus 1. In other words, the last index number in the list plus 1 would be returned by this function. Following example will demonstrate it −mysql> Select INTERVAL(50, 20, 32, 38, 40); +--------------------------+ ... Read More

What is the benefit of using MySQL SUM() function with GROUP BY clause?

Akshaya Akki

Akshaya Akki

Updated on 22-Jun-2020 05:08:37

232 Views

When we use MySQL SUM() function with GROUP BY Clause the SUM() function evaluates the sum for every group specified in the GROUP BY clause. The benefit of using SUM() with GROUP BY clause is that we can easily find the total of a particular group. To understand the above ... Read More

Advertisements