🔒 Closed About object and classes

Status
Not open for further replies.

esse08

Fanatic
Kindly, someone explains to me what is object and classes in java...
Hindi ko kasi alam anung difference ng dalawa...
Salamat sa papansin..
 
Class = blueprint or plano ng bahay (kumabaga autocad drawing ng plano, papel, hindi mo pa puweden tirahan)
Object = ay yung bahay mismo na gawa from the blueprint or plano (puwede mo ng tirhan)

In technical term: Object is the concrete INSTANCE of a Class

Halimbawa:

"public class House{ }" - is the way you create a class.
"House MyHouse = new House()" - is the way you create an object or make instance of House class

Another example:
Scanner input = new Scanner(System.in) - how you make object of the Scanner class
(Scanner class is gawa na ng Java)
 
Class = blueprint or plano ng bahay (kumabaga autocad drawing ng plano, papel, hindi mo pa puweden tirahan)
Object = ay yung bahay mismo na gawa from the blueprint or plano (puwede mo ng tirhan)

In technical term: Object is the concrete INSTANCE of a Class

Halimbawa:

"public class House{ }" - is the way you create a class.
"House MyHouse = new House()" - is the way you create an object or make instance of House class

Another example:
Scanner input = new Scanner(System.in) - how you make object of the Scanner class
(Scanner class is gawa na ng Java)
ahha ganun pala..Thank you
 
magiging second nature mo na mga iyan habang tumatagal ka sa Java.
just keep coding. Pag may hindi ka naintindihan, huwag mong gawing sagabal sa iyo. Skip and balikan mo na lang later.

pag nahanap mo na yung "AHA!" moment, that's the most satisfying part. Pakiramdam mo lahat ng programming languages ay kayang kaya mo na (which is partly true).

Goodluck!
 
magiging second nature mo na mga iyan habang tumatagal ka sa Java.
just keep coding. Pag may hindi ka naintindihan, huwag mong gawing sagabal sa iyo. Skip and balikan mo na lang later.

pag nahanap mo na yung "AHA!" moment, that's the most satisfying part. Pakiramdam mo lahat ng programming languages ay kayang kaya mo na (which is partly true).

Goodluck!
Sir pwede mo ba ako i-tutor ? C# programmer ako sa new job ko at ung previous language malayo ung language ko e.. Help me especially sa OOP. Salamat sir in advance :D
 
JaDyn
C# and Java are closed to each other. Very very close.
So kung susundan mo yung Tutorial ko under Java (I already have about 5 of the series) "Tutorial - oop - Illustrated", then you can apply that with C#. You just need to learn the C# syntax and how it do things.

Kung galing ka sa procedural programming then you are at advantage already. Lamang ka na. Konting adjustment na lang sa iyo para pag aralan mo ang Object Oriented Programming (oop).

Goodluck!
 
JaDyn
C# and Java are closed to each other. Very very close.
So kung susundan mo yung Tutorial ko under Java (I already have about 5 of the series) "Tutorial - oop - Illustrated", then you can apply that with C#. You just need to learn the C# syntax and how it do things.

Kung galing ka sa procedural programming then you are at advantage already. Lamang ka na. Konting adjustment na lang sa iyo para pag aralan mo ang Object Oriented Programming (oop).

Goodluck!


correct ka bro..
 
JaDyn
C# and Java are closed to each other. Very very close.
So kung susundan mo yung Tutorial ko under Java (I already have about 5 of the series) "Tutorial - oop - Illustrated", then you can apply that with C#. You just need to learn the C# syntax and how it do things.

Kung galing ka sa procedural programming then you are at advantage already. Lamang ka na. Konting adjustment na lang sa iyo para pag aralan mo ang Object Oriented Programming (oop).

Goodluck!
Ano po yang procedural programming?
 
esse08
Procedural programming = basically programming style na ang mga codes mo ay naka arrange in set and executed in order.

Halimbawa:
Program Start
Step 1
Step 2
Step 3
....do something before you go to step 4
Step 4
Step 5
...do something again before you end
End program

And this kind of codes need to be executed in order (keywords are "executed in order").
It's fine to use procedural. You can create software or system by using procedural.

The only BIG problem with procedural is it's hard to maintain or expand a program. Hard to read, hard to follow, hard to update without breaking it.

Hindi kagaya ng OOP, you can change or update one component without affecting the other components. OOP is much more preferred this days.
 
Status
Not open for further replies.

About this Thread

  • 8
    Replies
  • 850
    Views
  • 4
    Participants
Last reply from:
codyscott

Trending Topics

Online now

Members online
1,171
Guests online
1,050
Total visitors
2,221

Forum statistics

Threads
2,280,264
Posts
28,996,209
Members
1,226,674
Latest member
jpv25
Back
Top