- 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
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
334 Views
You can use aggregate function SUM() for this. Let us first create a table −mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstValue int, SecondValue int, ThirdValue int ); Query OK, 0 rows affected (0.57 sec)Insert some records in the ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
56 Views
An immutable copy of a LocalTime object where some nanoseconds are added to it can be obtained using the plusNanos() method in the LocalTime class in Java. This method requires a single parameter i.e. the number of nanoseconds to be added and it returns the LocalTime object with the added ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
To check capacity in Java, firstly create a list and add elements. After that use ensureCapacity() and increase the capacity.Let us first create an ArrayList and add some elements −ArrayListarrList = new ArrayList(5); arrList.add(100); arrList.add(200); arrList.add(300); arrList.add(400); arrList.add(500);Now, increase the capacity of the ArrayList −arrList.ensureCapacity(15);Meanwhile, with the size() method, you ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
3K+ Views
The method java.io.File.list() is used to obtain the list of the files and directories in the specified directory defined by its path name. This list of files is stored in a string array. If the length of this string array is greater than 0, then the specified directory is not ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
56 Views
A read-only char buffer can be created using the contents of a buffer with the method asReadOnlyBuffer() in the class java.nio.CharBuffer. The new buffer cannot have any modifications as it is a read-only buffer. However, the capacity, positions, limits etc. of the new buffer are the same as the previous ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
50 Views
An immutable copy of a LocalTime object where some seconds are subtracted from it can be obtained using the minusSeconds() method in the LocalTime class in Java. This method requires a single parameter i.e. the number of seconds to be subtracted and it returns the LocalTime object with the subtracted ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
Two lists are equal if they consist of same number of elements in the same order.Let’s say we have the following two lists −ListarrList1 = Arrays.asList(new Integer[] { 10, 20, 30, 45, 55, 70, 90, 100 }); ListarrList2 = Arrays.asList(new Integer[] {15, 25, 35, 50, 55, 75, 95, 120});Now, let’s ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
73 Views
You can use SUBSTRING() along with UPDATE command to delete last 4 letters. Let us first create a table −mysql> create table DemoTable ( StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, StudentSubject varchar(100) ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
466 Views
You can use row_count() at the end for this. Let us first create a table −mysql> create table rowAfftectedByDeleteDemo -> ( -> CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> CustomerName varchar(20) -> ); Query OK, 0 rows affected (0.86 sec)Insert some records in the table ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
111 Views
An immutable copy of a LocalDateTime with the nanoseconds altered as required is done using the method withNano() in the LocalDateTime class in Java. This method requires a single parameter i.e. the nanosecond that is to be set in the LocalDateTime and it returns the LocalDateTime with the nanosecond altered ... Read More