What are the sources of data objects a Stream can process?
A Stream can process the following data:
- A collection of an Array.
- An I/O channel or an input device.
- A reactive source (e.g., comments in social media or tweets/re-tweets)
- A stream generator function or a static factory
In Java 8, what is Method Reference?
Method reference is a compact way of referring to a method of functional interface. It is used to refer to a method without invoking it. :: (double colon) is used for describing the method reference. The syntax is class::methodName
For e.g.:
Integer::parseInt(str) \\ method reference
str -> Integer.ParseInt(str); \\ equivalent lambda
Feature of the new Date and Time API in Java 8?
- Immutable classes and Thread-safe
- Timezone support
- Fluent methods for object creation and arithmetic
- Addresses I18N issue for earlier APIs
- Influenced by popular joda-time package
- All packages are based on the ISO-8601 calendar system
Python Turtle Circle Animation Graphics
Python Graphics Trick
Source Code:-
import turtle
turtle.bgcolor("black");
turtle.pensize(1);
turtle.speed(0);
for i in range(6):
for colours in ["red","magenta","blue","green","yellow","white"]:
turtle.color(colours)
turtle.circle(100)
turtle.left(10)
turtle.hideturtle()
Subscribe to:
Posts
(
Atom
)