Programming Articles

Page 2537 of 2546

What is the difference between >> and >>> operators in Java?

Samual Sam
Samual Sam
Updated on 30-Jul-2019 2K+ Views

>> Binary Right ShiftThe left operand value is moved right by the number of bits specified by the right operand.>>> Shift right zero fillThe left operand value is moved right by the number of bits specified by the right operand and shifted values are filled up with zeros.

Read More

Is StringBuffer final in Java?

Anjana
Anjana
Updated on 30-Jul-2019 775 Views

Yes, StringBuffer class is final Java. We cannot override this class.

Read More

Why we do not import a package while we use any string function?

Sai Nath
Sai Nath
Updated on 30-Jul-2019 982 Views

The String class belongs to the java.lang package. This is the default package of the Java language therefore it is not mandatory to import it to use its classes.

Read More

What is the role of C++ in Computer Science?

Anjana
Anjana
Updated on 30-Jul-2019 299 Views

C++ is a programming language developed by Bjarne Stroustrup in 1979 at Bell Labs. C++ is regarded as a middle-level language, as it comprises a combination of both high-level and low-level language features. It is a superset of C, and that virtually any legal C program is a legal C++ program. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights. It has been used in the ...

Read More

Why C++ is the Best Programming Language?

Paul Richard
Paul Richard
Updated on 30-Jul-2019 1K+ Views

C++ is known to be a very powerful language. C++ allows you to have a lot of control as to how you use computer resources, so in the right hands, its speed and ability to cheaply use resources should be able to surpass other languages. Thanks to C++'s performance, it is often used to develop game engines, games, and desktop apps. Many AAA title video games are built with C++.C++'s greatest strength is how scalable it could be, so apps that are very resource intensive are usually built with it. As a statically typed language, C++ is generally more performant ...

Read More

Java string concat() method vs "+" operator

Akshaya Akki
Akshaya Akki
Updated on 30-Jul-2019 358 Views

The notable differences between concat() method and +operator are:concat() method+operatorYou cannot concat a null value to a String using the concat() method.You can concat null value using the ‘+’ operator.Using the concat() method you can concat only two String variables.Using the ‘+’ operator you can concat multiple values.Using the concat() method you can concat only String type of arguments.Using the ‘+’ operator you can concat any type of arguments.

Read More

Difference between HashMap and HashTable in Java.

Ankitha Reddy
Ankitha Reddy
Updated on 30-Jul-2019 21K+ Views

HashMap is non-syncronized and is not thread safe while HashTable is thread safe and is synchronized. HashMap allows one null key and values can be null whereas HashTable doesn't allow null key or value. HashMap is faster than HashTable. HashMap iterator is fail-safe where HashTable iterator is not fail-safe. HashMap extends AbstractMap class where HashTable extends Dictionary class.

Read More

How to exit from a Python if clause?

Malhar Lathkar
Malhar Lathkar
Updated on 30-Jul-2019 571 Views

It is not possible to exit from an if block of Python code. The break keyword does appear in if block but it has to inside a loop. It is however possible to exit from entire program from inside if block by sys.exit()

Read More

How to avoid Java code in jsp page?

radhakrishna
radhakrishna
Updated on 30-Jul-2019 318 Views

You can use JSTL, JSP Standard Tag Library or EL, Expression Language to avoid scriptlets.

Read More

What is string constant pool in Java?

Jai Janardhan
Jai Janardhan
Updated on 30-Jul-2019 975 Views

When you store a String asString str1 = "Hello";directly, then JVM creates a String object with the given value in a separate block of memory known as String constant pool.And whenever we try to create another String asString str2 = "Hello";JVM verifies whether any String object with the same value exists in the String constant pool, if so, instead of creating a new object JVM assigns the reference of the existing object to the new variable.And when we store String asString str = new String("Hello");using the new keyword, a new object with the given value is created irrespective of the ...

Read More
Showing 25361–25370 of 25,451 articles
Advertisements