+ 2
What is class and stream in java?
meaning of class
6 odpowiedzi
+ 10
You will find that out(classes at least) as u progress in the java course 😊
+ 5
A class describes what the object will be, but is separate from the object itself.
In other words, classes can be described as blueprints, descriptions, or definitions for an object. You can use the same class as a blueprint for creating multiple objects. The first step is to define the class, which then becomes a blueprint for object creation.
Each class has a name, and each is used to define attributes and behavior.
+ 3
Class is a blueprint of a real world object. For example you can have a car object. It has various attributes like wheels, doors, etc. And has methods like drive, stop, etc. So you include all these logic parts in car class
i.e.
class Car {
// attributes
private int wheels;
private int doors;
// methods
public void drive() {
// ...
}
public void stop() {
// ...
}
}
and now having a blueprint, you can start making car objects: Car a = new Car();
+ 1
Stream is something we refer to when talking about I/O (input and output). When you write a program that asks for user to enter input, it receives input stream. And when it writes something back to user, it sends an output stream
0
okay.All of you thank you very much😃