Day To Day Utility snippet
Q) create java stream for hard coded source
A : use Stream.of()
eg: Stream<Integer> stream= Stream.of(1,2,3,4);
Q) Arrays from java.unit , useful methods
A 1) Arrays.asList - create list from hard code value
asList(...arg)= return new ArrayList<>(arg) // ... operator -/. list of arguments converting to array
eg: Collection<String> collection= Arrays.asList("ABC","WSZ");
String[] s= new String[]{"dasda","Dasdas"};
Collection<String> collection1= Arrays.asList(s);
String
Q) get character at position from string
"abc".charAt(0)