- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Daniol Thomas has Published 211 Articles
Daniol Thomas
54 Views
The set() method of the AbstractList class is used to replace the element at the specified position in this list with the specified element. It returns the element that gets replaced.The syntax is as follows:public E set(int index, E ele)Here, the parameter index is the index of the element to ... Read More
Daniol Thomas
63 Views
The hashCode() method of AbstractList class returns the hash code value for this list.The syntax is as follows:public int hashCode()To work with the AbstractList class, import the following package:import java.util.AbstractList;The following is an example to implement hashCode() method of the AbstractlList class in Java:Example Live Demoimport java.util.ArrayList; import java.util.AbstractList; public class ... Read More
Daniol Thomas
10K+ Views
A BLOB is binary large object that can hold a variable amount of data with a maximum length of 65535 characters.These are used to store large amounts of binary data, such as images or other types of files. Fields defined as TEXT also hold large amounts of data. The difference ... Read More
Daniol Thomas
4K+ Views
You can use $where operator along with find() method to compare two fields in MongoDB. The syntax is as follows:db.yourCollectionName.find({$where:”yourCondition”}).pretty();To understand the above syntax, let us create a collection with some documents. The query to create a collection with documents is as follows:>db.compareTwoFields.insert({"Id":1, "FullName":{"FirstName":"John", "LastName":"Smith"}, "BranchName":"ComputerScience"}); WriteResult({ "nInserted" : 1 ... Read More
Daniol Thomas
121 Views
The clear() method of the AbstractCollection class is used to remove all the elements from this collection. This makes the collection empty.The syntax is as follows:public void clear()To work with AbstractCollection class in Java, import the following package:import java.util.AbstractCollection;First, create AbstractCollection and add some elements using the add() method:AbstractCollection absCollection ... Read More
Daniol Thomas
9K+ Views
CLOB stands for Character Large Object in general, an SQL Clob is a built-in datatype and is used to store large amount of textual data. Using this datatype, you can store data up to 2, 147, 483, 647 characters.The java.sql.Clob interface of the JDBC API represents the CLOB datatype. Since ... Read More
Daniol Thomas
1K+ Views
To get a random record from MongoDB, you can use aggregate function. The syntax is as follows:db.yourCollectionName.aggregate([{$sample:{size:1}}]);To understand the above syntax, let us create a collection with some documents. The query to create collection is as follows:>db.employeeInformation.insert({"EmployeeId":1, "EmployeeName":"Maxwell", "EmployeeAge":26}); WriteResult({ "nInserted" : 1 }) >db.employeeInformation.insert({"EmployeeId":2, "EmployeeName":"David", "EmployeeAge":25}); WriteResult({ "nInserted" : ... Read More
Daniol Thomas
73 Views
The contains() method of the AbstractCollection class checks whether an element is in the AbstractCollection or not. It returns a Boolean i.e. TRUE if the element is in the collection, else FALSE is returned.The syntax is as follows:public boolean contains(Object ele)Here, ele is the element to be checked for existence.To ... Read More
Daniol Thomas
2K+ Views
Assume we already have a table named MyData in the database with the following description.+---------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+---------+-------+ | Name | varchar(255) | YES | ... Read More
Daniol Thomas
450 Views
The ResultSet interface provides the method named getClob() to retrieve clob datatype from a table in a database. In addition to this it also provides a method named getCharacterStream()Like getClob() this method also accepts an integer representing the index of the column (or, a String value representing the name of ... Read More
To Continue Learning Please Login
Login with Google