Arushi has Published 152 Articles

How to create a string from a Java Array?

Arushi

Arushi

Updated on 20-Feb-2020 04:49:12

313 Views

You can convert an array of Strings to a single array using the collect() method.ExampleLive Demoimport java.util.Arrays; import java.util.stream.Collectors; public class CreatngStringFromArray {    public static void main(String args[]) {       String [] myArray = {"Welcome", "to", "Tutorialspoint"};       String str = Arrays.stream(myArray).collect(Collectors.joining(" ")); ... Read More

How to define constants in C++?

Arushi

Arushi

Updated on 11-Feb-2020 08:08:30

564 Views

You can define constants in C++ by adding the const qualifier before the declaration of the variable. Example#include using namespace std; int main() {    const int x = 9;    x = 0;    return 0; }This will define the constant variable x. But it will throw an error ... Read More

What is the relation between auto and decltype in C++?

Arushi

Arushi

Updated on 11-Feb-2020 07:59:34

839 Views

Auto and decltype serve different purposes so they don't map one-to-one. auto is a keyword in C++11 and later that is used for automatic type deduction. The decltype type specifier yields the type of a specified expression. Unlike auto that deduces types based on values being assigned to the variable, ... Read More

How can I customize value, instead of NULL, of a row by using MySQL IF() function?

Arushi

Arushi

Updated on 11-Feb-2020 06:18:34

56 Views

Suppose in our ‘Employee’ table we are having NULL as the value of ‘salary’ column for two employees. The data, shown as follows, is itself not meaningful.mysql> Select * from employee; +----+--------+--------+ | ID | Name   | Salary | +----+--------+--------+ | 1 | Gaurav  | 50000  | | 2 ... Read More

What is C++ Standard Error Stream (cerr)?

Arushi

Arushi

Updated on 10-Feb-2020 13:41:41

4K+ Views

std::cerr is an object of class ostream that represents the standard error stream oriented to narrow characters (of type char). It corresponds to the C stream stderr. The standard error stream is a destination of characters determined by the environment. This destination may be shared by more than one standard ... Read More

How to Install C++ Compiler on Windows?

Arushi

Arushi

Updated on 10-Feb-2020 12:09:05

5K+ Views

There are several alternatives for compiling C++ on windows. Let's look at 2 of them:GCCTo install GCC on Windows you need to install MinGW. To install MinGW, go to the MinGW homepage, www.mingw.org, and follow the link to the MinGW download page. Download the latest version of the MinGW installation ... Read More

What is the resemblance of COALESCE() function with IF-THEN-ELSE statement?

Arushi

Arushi

Updated on 10-Feb-2020 08:12:53

427 Views

As we know that COALESCE() function returns first non-NULL value from the list of values. The following IF-THEN-ELSE statement is equivalent to COALESCE() function.IF value1 is not NULL THEN output = value1; ELSIF value2 is not NULL THEN output = value2; ELSIF value3 is not NULL THEN output = value3; ... Read More

What is the difference between “lang” and “type” attributes in a script tag?

Arushi

Arushi

Updated on 12-Sep-2019 08:31:25

161 Views

JavaScript lang attributeThis attribute specifies what scripting language you are using. Typically, its value will be javascript. Although recent versions of HTML (and XHTML, its successor) have phased out the use of this attribute.JavaScript type attributeThis attribute is what is now recommended to indicate the scripting language in use and ... Read More

Java ResultSet getDriverMajorVersion() method with example

Arushi

Arushi

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

86 Views

When we execute certain SQL queries (SELECT query in general) they return tabular data.The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQuery() method of the Statement interface in general).The ... Read More

Java ResultSet deleteRow() method with example

Arushi

Arushi

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

2K+ Views

When we execute certain SQL queries (SELECT query in general) they return tabular data.The java.sql.ResultSet interface represents such tabular data returned by the SQL statements.i.e. the ResultSet object holds the tabular data returned by the methods that execute the statements which quires the database (executeQuery() method of the Statement interface in general).The ResultSet ... Read More

Previous 1 ... 5 6 7 8 9 ... 16 Next
Advertisements