0% found this document useful (0 votes)
3 views1 page

Java Unit3 Handwritten Notes

The document outlines new features in Java, including functional interfaces, lambda expressions, method references, and default methods. It also covers the Stream API, Base64 encoding, try-with-resources, type annotations, and the module system. Additional features mentioned are the diamond operator, var for auto type detection, switch expressions, text blocks, records, and sealed classes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Java Unit3 Handwritten Notes

The document outlines new features in Java, including functional interfaces, lambda expressions, method references, and default methods. It also covers the Stream API, Base64 encoding, try-with-resources, type annotations, and the module system. Additional features mentioned are the diamond operator, var for auto type detection, switch expressions, text blocks, records, and sealed classes.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT-3: JAVA NEW FEATURES (AKTU QUICK NOTES)

1. Functional Interface: One abstract method. Used in lambda.

Example: A obj = () -> [Link]('Hello');

2. Lambda Expression: Shortcut function → (a,b) -> a+b

3. Method Reference: Class::method (e.g., Integer::parseInt)

4. Default Method: Can have body in interface

Static Method: Called using Interface name

5. Stream API: Process data

Example: [Link]().filter(x->x%2==0).forEach([Link]::println);

6. Base64: Encode/Decode data

7. forEach: [Link](x->[Link](x));

8. Try-with-resources: Auto close resources

9. Type Annotation: Used on types

10. Repeating Annotation: Same annotation multiple times

11. Module System: [Link]

12. Diamond Operator: new ArrayList<>()

13. var: Auto type detection

14. Switch Expression: case -> value

15. Text Block: """ multi-line string """

16. Records: record Student(String name,int age){}

17. Sealed Class: sealed class A permits B,C{}

You might also like