My name is Nilendu Bhattacharya and I am the creator of Java Made Easy channel. I have total of more than two decades of experience in the fields of Software development and training. I have developed many enterprise level software and worked in many technologies. I also have the privilege of training thousands of students over the years. This channel aspires to present Java and related technologies in a easy and useful manner. I hope you like this channel. You can contact me at nilendu.bhattacharya@gmail.com.
Thanks for video/ I have an issue with this way of sorting though. Because, when the first field is sorted , second one is ignored/ For ex suppose there are two fields Age and name , & i intend to sort on age and name both. So if there are two entries with age 34, and name as Abhi and Nutan, I need Abhi to appear first in the list and then Nutan. How do I achieve this?
hey i just wanna say that GOD loved the world so much he sent his only begotten son Jesus to die a brutal death for us so that we can have eternal life and we can all accept this amazing gift this by simply believing in him (Jesus) asking for the forgiveness of your sins and forming a relationship with heavenly father.
I am getting below error can anyone help me with this WARN: HHH000181: No appropriate connection provider encountered, assuming application will be supplying connections Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: EclipseJPA] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) at com.neeru.First_JPA_Maven.Student_Test.main(Student_Test.java:9) Caused by: org.hibernate.HibernateException: Connection cannot be null when 'hibernate.dialect' not set at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:97) at org.hibernate.service.jdbc.dialect.internal.DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:67) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:176) at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)
In the anonymous class, the compare method returns a value of type int but you return a value of type String(getname()), why isn't that an error?, where does the method compareTo come from it's not implemented anywhere in the classes
Excellent explanation. Adding to your video.. we can do something like below in java8 with multiple fields: listOfEmps.stream().sorted(Comparator.comparing(Employee::getEmpId).thenComparing(Employee::getEmpName)).forEach(System.out::println);
Whoa this is a lot simpler than the method I had found, though slightly less flexible. I think I'll use this way of sorting on multiple fields in the future for a lot of 'one-time' sorting jobs where I don't necessarily need to sort the data in a lot of different ways.
Is it in a separate video that you said the lambda representation for supplier is, for example () -> new User(1, "John")? I didn't see that in the previous examples in this video. I'm confused by the syntax (1, "John"). Please explain.
User has an id and a name, thus when creating the object it needs two arguments, the 1 is the id and "John" is the name, so basically you instantiate the User object only inside the suppliers get() method. Sorry if I misunderstood your comment.
I am confused here... I have a list of ranks.. and I like to display the highest rank first... The following ranks are as follows from highest to lowest: Super Sleuth, Master Detective, Senior Detective, Detective, Junior Detective etc... how would I do that?