Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

careerDevelopment/javaPreparation

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
6 Commits
 
 

Repository files navigation

Java Interview Preparation

Table of Contents

No. Questions
Java 8
1 Why java 8?
2 Java 8 new Features?
3 Java 8 main advantages?
4 Lambda expressions in java 8?
5 Context API in react?
6 Hooks in react?
7 Optimization Techniques in react?
8 How to share the logic across the components?
9 What are some packages that you use along with React ?

Java 8 Features and Examples with Interview Questions

  1. Why java 8?

    1. Significant reason for introducing java 8 was to introduce conciseness in the code.
    2. Java 8 Brings the functional programming which enabled by lambda expressions(a powerful tool to create concise code base).
    3. If you ever observed/heard, With Python,Scala we can do the same things in very less LOC. By mid 20s Java lost a large market due to these languages. To prevent further loss java upgraded itself from only OOPs language to some concepts of FP to create concise code base.

    ⬆ Back to Top

  2. Java 8 new Features?

    1. Lambda expressions
    2. Functional interface
    3. Stream API
    4. Default Methods in the interface
    5. Static methods
    6. Optional class
    7. Method references
    8. Date API
    9. Nashorn JavaScript Engine

    ⬆ Back to Top

  3. Java 8 main advantages?

    1. Compact Code
    2. More readable and reusable code
    3. More testable code
    4. Parellel operations

    ⬆ Back to Top

  4. Java 8 Lambda Expressions?

    1. Lambda expression is an anonymous function(Without name,return type and access modifiers and having one lambda(->))
      1. Normal programming Technique
                
                    public int add(int a ,int b){                
                        return(a+b);
                    }
                
            
      2. Equivalent Lambda Expressions
        <pre>
            <code>
               (a,b)-> (a+b);
             </code>
        </pre>
        </li>
        </ol>
        

    ⬆ Back to Top

About

Java Preparation with latest features and examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.