George John has Published 1081 Articles

Atomic variables in Java

George John

George John

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

448 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

292 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

413 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

96 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

1K+ 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

291 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.

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

George John

George John

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

4K+ 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

How to Learn C++ Programming?

George John

George John

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

327 Views

So you've decided to learn how to program in C++ but don't know where to start. Here's a brief overview of how you can get started. Get a C++ Compiler This is the first step you'd want to do before starting learning to program in C++. There are good free ... Read More

How can we delete all rows from a MySQL table?

George John

George John

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

1K+ Views

We can use either TRUNCATE statement or DROP statement to delete all the rows from the table. It can also be done with the help of DELETE statement but in that case WHERE clause must identify all the rows of the table. As we know that both TRUNCATE and DELETE ... Read More

Advertisements