JAVA Compare strings alphabetically and sort objects in ArrayList

preview_player
Показать описание
This code will show the basic way of how to compare strings alphabetically using compareTo method and more to that - we`re going to implement Comparable interface so we can simply sort arraylist of objects of this class.
=====================================
=====================================
Рекомендации по теме
Комментарии
Автор

my friend and i would like to give you our deepest thanks for keeping us from throwing our laptops because we couldn't figure this out. have a frikin great day

emilysub
Автор

my best friend and i would like to give you our deepest thanks for keeping us from throwing our computers because we couldn't figure this out. have a frikin great day, U ARE THE BEST.

Axel_
Автор

thank you sir, very helpful video, keep it up 👍👍👍👍

SmartProgramming
Автор

Thank you for this appreciate your work

BBTALKZ
Автор

Thanks was fighting with my array sorting in Z to A order rather than A to Z. My issue was my compareTo method had the line rather than this.compareTo(person). In my case I am using Songs...but the idea is the same.

bigj
Автор

it is not a abstract class so not allowed to override compareto method.

sairohit
Автор

my friend and i would like to give you our deepest thanks for keeping us from throwing our laptops because we couldn't figure this out. have a frikin great day

yxgxrt