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
Paul Richard has Published 66 Articles
Paul Richard
181 Views
With the help of ALTER EVENT statement along with the RENAME keyword, we can RENAME an existing event. To illustrate it we are having the following example in which we are renaming the event ‘Hello’ to ‘Hello_renamed’ −Examplemysql> ALTER EVENT Hello RENAME TO Hello_renamed; Query OK, 0 rows affected (0.00 ... Read More
Paul Richard
203 Views
Following example uses iterator Method of Collection class to iterate through the HashMap.Example Live Demoimport java.util.*; public class Main { public static void main(String[] args) { HashMap< String, String> hMap = new HashMap< String, String>(); hMap.put("1", "1st"); hMap.put("2", "2nd"); ... Read More
Paul Richard
14K+ Views
Arrays can be compared using following ways in JavaUsing Arrays.equals(array1, array2) methods − This method iterates over each value of an array and compare using equals method.Using Arrays.deepEquals(array1, array2) methods − This method iterates over each value of an array and deep compare using any overridden equals method.Using == on ... Read More
Paul Richard
114 Views
It can be done by using UNIX_TIMESTAMP() function as follows −mysql> Select UNIX_TIMESTAMP(CONCAT(YEAR(CURDATE()), '-01-01')); +--------------------------------------------------+ | UNIX_TIMESTAMP(CONCAT(YEAR(CURDATE()), '-01-01')) | +--------------------------------------------------+ | 1483209000 | +--------------------------------------------------+ 1 row in set (0.03 sec)It can ... Read More
Paul Richard
308 Views
A subquery is best defined as a query within a query. Subqueries enable you to write queries that select data rows for criteria that are actually developed while the query is executing at runtime. More formally, it is the use of a SELECT statement inside one of the clauses of ... Read More
Paul Richard
159 Views
As we know that CONCAT() function returns NULL if any of the arguments is NULL but CONCAT_WS() function returns NULL only if the first argument i.e. the separator is NULL and it ignores any other NULL. We can say this is the advantage of CONCAT_WS() function over CONCAT() function when ... Read More
Paul Richard
113 Views
MySQL CHAR() function will ignore NULL if it is provided as an argument to it. To understand it, consider the following examples −mysql> Select CHAR(65, 66, 67, NULL); +---------------------+ | CHAR(65, 66, 67, NULL) | +---------------------+ | ABC | +---------------------+ 1 row ... Read More
Paul Richard
163 Views
With Java 9, new factory methods are added to Set interface to create immutable instances. These factory methods are convenience factory methods to create a collection in less verbose and in concise way.Old way to create collectionsExampleimport java.util.Collections; import java.util.HashSet; import java.util.Set; public class Tester { public static ... Read More
Paul Richard
414 Views
Double braces can be used to create and initialize objects in a single Java expression. See the example below −Exampleimport java.util.ArrayList; import java.util.List; public class Tester{ public static void main(String args[]) { List list = new ArrayList(); list.add("A"); ... Read More
Paul Richard
701 Views
Forward declarations means the declaration of a method or variable prior to its implementation. Such declaration is necessary in C/C++ programming language in order to be able to use a variable or object before its implementation. In case, if we want to use a library code, then we need to ... Read More