Java8 Version Features|SteamAPI

Pubblicato il: 31 marzo 2024
sul canale di: UniqueCodingHeros Upcoming...
14
0

#java8 java8 Features
Important Interview Question:-
1.Difference between java6 and java8
2.What is Stream API
3.Sorting of programs.
4:-As strings are immutable so how we can create custom immutable class in java.
Ans:-1.class need to define as final, so that it cannot be extended.2.Declare all field as final.3.Declare all field as private.4.Only provide getter method.5.Parameterized construtor should be initilized.


final class bikash{
//member variable
private final String name;

//constructor
public bikash(String name)
{
this.name=name;

}
// Getter Method

public String getName(){

}
}

5:- what is difference between classNotFoundException and NoClassDefFoundError?

Ans:-ClassNotfoundException- An exception that occurs when you to load a class at run time using class.forName() or load class method and mention class is not found in the class path is called ClassNotFoundException

NoClassDefFoundError-An exception that occurs when a particular class is presnet at compile time but was missing at run time.

Full Playlist:-   • Java interview Question| Recently asked Qu...  


In questa pagina del sito puoi guardare il video online Java8 Version Features|SteamAPI della durata di ore minuti seconda in buona qualità , che l'utente ha caricato UniqueCodingHeros Upcoming... 31 marzo 2024, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 14 volte e gli è piaciuto 0 spettatori. Buona visione!