George John has Published 1234 Articles

Java variable naming rules

George John

George John

Updated on 30-Jul-2019 22:30:21

3K+ Views

All Java components require names. Names used for classes, variables, and methods are called identifiers. In Java, there are several points to remember about identifiers. They are as follows - Step 1 − All identifiers should begin with a letter (A to Z or a to z), currency character ($) ... Read More

Atomic variables in Java

George John

George John

Updated on 30-Jul-2019 22:30:21

120 Views

Yes, from Java 8 onwards, java.util.concurrent.atomic package contains classes which support atomic operations on single variables preventing race conditions or do not face synchronization issues. All classes in the atomic package have get/set methods. Each set method has a happens-before relationship with any subsequent get() method call on the same ... Read More

Java Variable Narrowing Example

George John

George John

Updated on 30-Jul-2019 22:30:21

2K+ Views

Narrowing refers to passing a higher size data type like int to a lower size data type like short. It may lead to data loss. Casting is required for narrowing conversion. Following program output will be 44. public class MyFirstJavaProgram { public static void main(String []args) ... Read More

Regex named groups in Java

George John

George John

Updated on 30-Jul-2019 22:30:21

156 Views

Java Regex Capturing Groups

What is a smart pointer and when should I use it in C++?

George John

George John

Updated on 30-Jul-2019 22:30:21

280 Views

A smart pointer is a class that wraps a 'raw' (or 'bare') C++ pointer. It is used to manage resources the pointer points to. For example, if the reference to that memory location is lost. It kind of acts like a garbage collector. There are multiple smart pointer types.You should ... Read More

In MySQL, how to check for a pattern which is not present within an expression?

George John

George John

Updated on 30-Jul-2019 22:30:21

46 Views

MySQL NOT RLIKE operator can be used to check for a pattern which is not present within an expression. The syntax for NOT RLIKE is as follows − Syntax NOT RLIKE Pat_not_for_match Here Pat_not_for_match is the pattern which is not to be matched with the expression. Example ... Read More

How MySQL SUM() function evaluates if the column having NULL values too?

George John

George John

Updated on 30-Jul-2019 22:30:21

849 Views

Suppose if we are calculating the sum of the values of a column which also have NULL values then MySQL SUM() function ignores the NULL values and does the sum of the rest of the values. To understand it, consider the following example of table ‘employee’, having following details − ... Read More

Learn Everything about Java String?

George John

George John

Updated on 30-Jul-2019 22:30:21

95 Views

The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class. Strings are constant, their values cannot be changed after they are created. To learn more about Strings visit Tutorialspoint Strings page.

How is it possible for a MySQL trigger to execute multiple statements?

George John

George John

Updated on 30-Jul-2019 22:30:21

607 Views

The MySQL trigger can execute multiple statements with the help of BEGIN…END construct. Within the BEGIN block, we can also use another syntax that is permitted within stored routines such as conditionals and loops. For illustrating the concept, we are using the following example of BEFORE INSERT TRIGGER is having ... Read More

Difference between static, auto, global and local variable in C++

George John

George John

Updated on 30-Jul-2019 22:30:21

3K+ Views

There are two separate concepts here − scope, which determines where a name can be accessed - global and local storage duration, which determines when a variable is created and destroyed - static and auto Scope Local variables can be used only by statements that are inside that ... Read More

Advertisements