- Trending Categories
- 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
Karthikeya Boyini has Published 2383 Articles
karthikeya Boyini
91 Views
Let us first see what we need to work with JavaTuples. To work with Quartet class in JavaTuples, you need to import the following package −import org.javatuples.Quartet;Note − Steps to download and run JavaTuples program If you are using Eclipse IDE to run Quartet Class in JavaTuples, then Right Click ... Read More
karthikeya Boyini
580 Views
The range of values for a field can be obtained using the range() method in the Instant class in Java. This method requires a single parameter i.e. the ChronoField for which the range of values are required and it returns the range of valid values for the ChronoField.A program that ... Read More
karthikeya Boyini
549 Views
Let’s say the value is 0.10705921712947473 and you want to save only the first 3 decimal digits. At first let us declare the values −double val = 320.0 / 2989.0; BigDecimal big = new BigDecimal(val);Now, use setScale() and set the parameter as 3 to save 3 decimal places −big = ... Read More
karthikeya Boyini
282 Views
You can use system variables character_set_server to know the default server character set in MySQL. Following is the syntax −SHOW VARIABLES LIKE 'character_set_server';Additionally, to u can use collation_server system variable to know the default collation in MySQL. Following is the syntax −SHOW VARIABLES LIKE 'collation_server';Let us execute the above syntaxes ... Read More
karthikeya Boyini
43 Views
An immutable copy of a duration where some nanoseconds are removed from it can be obtained using the minusNanos() method in the Duration class in Java. This method requires a single parameter i.e. the number of nanoseconds to be subtracted and it returns the duration with the subtracted nanoseconds.A program ... Read More
karthikeya Boyini
1K+ Views
The syntax is as follows to skip the duplicate value and select only one from the duplicated values −select min(yourColumnName1), yourColumnName2 from yourTableName group by yourColumnName2;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table doNotSelectDuplicateValuesDemo -> ... Read More
karthikeya Boyini
305 Views
You can use $set operator for this Let us first create a collection with documents −> db.updateRecordDemo.insertOne({"StudentName":"Larry"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6f95de8cc557214c0e0a") } > db.updateRecordDemo.insertOne({"StudentName":"David"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6f9cde8cc557214c0e0b") } > db.updateRecordDemo.insertOne({"StudentName":"Mike"}); { "acknowledged" : true, "insertedId" : ObjectId("5cbd6f9dde8cc557214c0e0c") ... Read More
karthikeya Boyini
53 Views
The addAtX() method is used to add value to the Septet Tuple. The index can be set here with the X i.e. the place where the value gets added.Let us first see what we need to work with JavaTuples. To work with Septet class in JavaTuples, you need to import ... Read More
karthikeya Boyini
790 Views
An immutable copy of the LocalDate where the months are added to it can be obtained using the plusMonths() method in the LocalDate class in Java. This method requires a single parameter i.e. the number of months to be added and it returns the instant with the added months.A program ... Read More
karthikeya Boyini
278 Views
To find all prime numbers up to any given limit, use the Sieve of Eratosthenes algorithm. At first we have set the value to be checked −int val = 30;Now, we have taken a boolean array with a length one more than the val −boolean[] isprime = new boolean[val + ... Read More