Nancy Den has Published 330 Articles

C Program to find sum of two numbers without using any operator

Nancy Den

Nancy Den

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

1K+ Views

In this section we will see how to print the sum of two numbers without using any type of operator into our program.This problem is tricky. To solve this problem we are using minimum width field of printf() statement. For an example if we want to put x number of ... Read More

Ternary operator ?: vs if…else in C/C++

Nancy Den

Nancy Den

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

635 Views

We know that the ternary operator is the conditional operator. Using this operator, we can check some condition and do some task according to that condition. Without using the ternary operator, we can also use the if-else conditions to do the same.The effect of ternary operator and if-else condition are ... Read More

What is the difference between the methods setBlob() and setBinaryStream() which is preferable in JDBC?

Nancy Den

Nancy Den

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

685 Views

The setBlob() method is used to set value for Blob datatype in the database. It has three variants as follows:void setBlob(int parameterIndex, Blob x): Sets the given Blob value to the parameter at the specified index.void setBlob(int parameterIndex, InputStream inputStream): Sets the contents of the given input stream as a ... Read More

What is AbstractList Class in Java?

Nancy Den

Nancy Den

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

509 Views

The AbstractList class provides an implementation of the List interface.For an unmodifiable listProgrammer needs to extend this class and provide implementations for the get(int) and size() methods.For a modifiable listProgrammer must override the set(int, E) method. If the list is variable-size the programmer must override the add(int, E) and remove(int) ... Read More

Print leading zeros with C++ output operator

Nancy Den

Nancy Den

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

6K+ Views

Here we will see how to print leading zeros as output in C++. We know that if we directly put some zeros before some numeric values, then all zeros are discarded, and only exact numbers are printed.In C, we can solve this problem by using some options of format specifier. ... Read More

How to add elements to AbstractList class in Java?

Nancy Den

Nancy Den

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

261 Views

To add elements to AbstractList class, the add() method is provided by the AbstractList class. The elemnt gets appended at the end of the list.The syntax is as follows:public boolean add(E ele)Here, the parameter ele is an element to be appended to this listTo work with the AbstractList class, import ... Read More

Find objects between two dates in MongoDB?

Nancy Den

Nancy Den

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

3K+ Views

Use operator $gte and $lt to find objects between two dates in MongoDB. To understand these operators, let us create a collection.Creating a collection here:>db.order.insert({"OrderId":1, "OrderAddrees":"US", "OrderDateTime":ISODate("2019-02-19")}; WriteResult({ "nInserted" : 1 }) >db.order.insert({"OrderId":2, "OrderAddrees":"UK", "OrderDateTime":ISODate("2019-02-26")}; WriteResult({ "nInserted" : 1 })Display all documents from the collection with the help of ... Read More

HTML5 applicationCache vs Browser Cache

Nancy Den

Nancy Den

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

276 Views

HTML5 applicationCacheIt can be understood by an example that a web application is cached, and accessible without a connected internet. Application cache has some advantages: users can use the application when they're offline, cached resources load faster and reduced server load. Browser cache Web browsers use caching to store HTML web pages by ... Read More

Top 10 websites for Advanced level Java developers

Nancy Den

Nancy Den

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

491 Views

There are many sites which are a good resource for java interview questions-answers. Following is the list of most popular websites.Tutorialspoint - www.tutorialspoint.comStackOverflow - www.stackoverflow.comDZone - www.dzone.comWikipedia - www.wikipedia.orgIBM Developer Works - www.ibm.com/developerworks/java/TechGig - www.techgig.comGitHub - www.github.comJava documentation - docs.oracle.com/javase/Coursera - www.coursera.org/JavaWorld - www.javaworld.com/Read More

ABAP constants with %_ as prefix

Nancy Den

Nancy Den

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

243 Views

The constants with a value of %_ as prefix are defined in ABAP for its internal use of the system. These needs to be used as such and cannot be modified by the user.

Advertisements