Difference between StringBuffer and StringBuilder

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

1K+ Views

The StringBuffer and StringBuilder classes are used when there is a necessity to make a lot of modifications to Strings of characters.Unlike Strings, objects of type StringBuffer and String builder can be modified over and over again without leaving behind a lot of new unused objects.The StringBuilder class was introduced as of Java 5 and the main difference between the StringBuffer and StringBuilder is that StringBuilder’s methods are not thread safe (not synchronized).It is recommended to use StringBuilder whenever possible because it is faster than StringBuffer. However, if the thread safety is necessary, the best option is StringBuffer objects. Read More

SQL Operation Supported in SAP HANA SPS07 SDA

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

206 Views

With use of SAP HANA SPS06 Smart Data Access, you can only perform Select, Insert, Update and Delete operation on virtual tables moved using new remote data source.

When is a Semicolon After Mandated in C++ Program

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

2K+ Views

A semicolon after a close brace is mandatory if this is the end of a declaration. In case of braces, they have used in declarations of class, enum, struct, and initialization syntax. At the end of each of these statements, we need to put a semicolon. For example, class X {}; // same declaration for struct as well enum Y {}; int z[] = {1, 2}; A semicolon by itself is an empty statement, and you'll be able to add additional ones anywhere a statement is legal. Therefore it might be legal to place a ... Read More

NULL Argument in MySQL CONV Function

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

133 Views

MySQL will return NULL as the output if any of the argument of CONV() function is NULL or if the value provided for the base is out of limit(i.e. not between minimum 2 and maximum 36). Following examples would demonstrate it. Example mysql> Select CONV(10,NULL,2); +-----------------+ | CONV(10, NULL,2)| +-----------------+ | NULL | +-----------------+ 1 row in set (0.00 sec) mysql> Select CONV(10,10, NULL); +------------------+ | CONV(10,10, NULL)| +------------------+ | NULL | +------------------+ 1 row in set (0.00 sec) mysql> Select CONV(NULL,10,2); +-----------------+ | CONV(null,10,2) | +-----------------+ | NULL | +-----------------+ 1 row in set (0.00 sec)

Differentiating Between Row and Column Store Tables in SAP HANA Database

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

707 Views

Yes, it is possible to differentiate between both the table types.  When you go to schema and view the newly created table, you can see vertical lines in front of table name and it confirms that this is column store table.In below pic, you can see the difference between a Row store table and Column store table.

Fastest Pure JavaScript Graph Visualization Toolkit

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

133 Views

The fastest and pure JavaScripr Graph visualization toolkit isJavaScript InfoVis Toolkit. With it, you can, Perform Graph manipulation, Create bar graphs, Custom nodes, Implementing NodeTypes Adding subtrees, Drag and drop nodes, etc.

Meaning of JavaScript void 0

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

273 Views

The void operator is used to evaluate the given expression. After that, it returns undefined. It obtains the undefined primitive value, using void(0).If inserting an expression into a web page results in unwanted effect, then use JavaScript void to remove it. Adding JavaScript:Void(0), returns the undefined primitive value.The void operator is used to evaluate the given expression. After that, it returns undefined. It obtains the undefined primitive value, using void(0).We used JavaScript:void(0) above to prevent the page from reloading when the button is clicked the first time.It only works when the button will be clicked twice. If it is clicked ... Read More

How MySQL Behaves with INTERVAL Keyword and Invalid Date

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

173 Views

Actually, the behavior of MySQL depends upon the allow_invalid_dates mode. If this mode is enabled then MySQL will accept the invalid date and it would perform the date arithmetic as it performs with a valid date. Otherwise, if this mode is inactive then it will not accept the invalid date and would produce NULL as output. mysql> select '2017-02-30' + INTERVAL 7 day; +-------------------------------+ | '2017-02-30' + INTERVAL 7 day | +-------------------------------+ | NULL ... Read More

Line Breaks in JavaScript Alert

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

5K+ Views

To add line breaks to JavaScript alert, use “\r”. In the following example, we will see how to display text in JavaScript alert.Example Live Demo                    function DisplayAlert() {             var newLine = "\r"             var msg = "Showing how to add line break."             msg += newLine;             msg += "Line Break can be easily added in JavaScript.";             msg += newLine;             msg += "Simply Easy Learning";             msg+= newLine;             msg += "TutorialsPoint.com";             alert(msg); }

Swap Two String Variables Without Third Variable

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

3K+ Views

To swap the contents of two strings (say s1 and s2) without the third, first of all concatenate them and store in s1. Now using the substring() method of the String class store the value of s1 in s2 and vice versa.Example Live Demopublic class Sample {    public static void main(String args[]){       String s1 = "tutorials";       String s2 = "point";       System.out.println("Value of s1 before swapping :"+s1);       System.out.println("Value of s2 before swapping :"+s2);       int i = s1.length();       s1 = s1+s2;       s2 = ... Read More

Advertisements