top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between structure and a class?

0 votes
414 views
What is the difference between structure and a class?
posted Jun 2, 2014 by Deepak Negi

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Structure default access type is public , but class access type is private. A structure is used for grouping data whereas class can be used for grouping data and methods.
Structures are exclusively used for data and it doesn’t require strict validation , but classes are used to encapsulates and inherit data which requires strict validation.

answer Jun 2, 2014 by Rajneesh
...