|
|
|
Forum >
How does Guava: Google Core Library Works?
How does Guava: Google Core Library Works?
Please sign up and join us. It's open and free.
Page:
1
amritsingh
3 posts
Dec 17, 2021
2:29 AM
|
Guava is a google core library for java. It is used to extend the Java language with new functionalities. This is not like any other extension of java, Guava is much more powerful than it. Guava has various features which are as follows:
Collections that are immutable and thread-safe Functional interfaces for common tasks Immutable objects Lazy evaluation of data A caching API that helps in reducing the number of trips to the database An abundance of standard utilities such as string manipulation, concurrency, and I/O special support These are the classes that you will need to learn before going into Guava Google Core Library.
The first class is Vector which allows us to store data in the collection or array form. In the array form, it is similar to the ArrayList class. Following are some of its methods:
1) public boolean add(E e): This method adds the element to the end of the list. The return value of this method is boolean i.e., if it is true, then the element is added successfully otherwise false.
2) public boolean addAll(Collection extends E> c): This method adds all elements from the Collection c elements to this list at once and returns true i.e. if it is successful else false.
3) public void clear(): This method removes all elements from this list and sets the size of this list as 0. The return value of this method is void.
4) public boolean contains(Object o): This method checks whether the specified element exists in this list or not, but it does not remove that element from this list.
Eiliana is a freelancing website where you can find and apply for freelance projects. If you have experience in Oracle Java development and want to grow your portfolio, this is the ideal place for you!
Last Edited by amritsingh on Dec 20, 2021 9:48 PM
|
looneyhans
Guest
Jan 12, 2022
9:43 PM
|
Awesome! Learned alot thanks so much keep posting more. https://fencingyakimawa.com
|
Post a Message
|
|