-
Create an ArrayList of Employee( id,name,address,sal) objects and retrieve objects from ArrayList by using forEach() method of Iterable interface.
-
Create two interfaces Piano & Guitar with single default method void play() with different implementations. Add single implementation class Instrument for both the interfaces. Solve method name ambiguity in Instrument class by using two different approaches.
-
Create an interface WordCount with single abstract method int count(String str) to count no.of words in a given string. Implement count(String str) method by using Lambda expression in an implementation class MyClassWithLambda & invoke it to display the result on the console.
-
Add following Ideas to Assignment 1
i. Along with getters & setters add a static method static int compareBySal(Employee e1,Employee e2) to compare employee based onsalary.
ii. Use Collections.sort (-,-) method to compare employee objects of Array List.
iii. Invoke compareBySal() method by using Method Reference and pass it as second argument to the sort() method.
-
Write a java class to find the date of next month second Sunday by using java time API.
-
Write a java class to calculate your experience (no.of years, no.of months &no.of days) in Wipro by using java time API.
-
Create a java class to
i. Create a list of string objects
ii. Count no.strings whose length is> 5
iii. Count no.of empty strings
iv. Find out empty strings & store them into new list by using Stream API.
-
Notifications
You must be signed in to change notification settings - Fork 2
teztripathy/TopGear-L3-Java-Asgmt2
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published