Class in Java - Things to knowFollowing are some key thing about Class in Java programming language for beginners :
1) Class is represented using class keyword
2) There are two kinds of class, top level and nested class in Java.
3) According to Java convention, name of class should start with capital letter.
4) Unlike C structures which is analogous to class, Java classes can contain not only variables but also methods which operate on those fields.
5) Class is the smallest unit of modular code, functionality in Java is presented in terms of class.
6) As per SRP (Single Responsibility Principle) SOLID design principle, a class should only represent one thing and there should not be more than one reason to change a class. Well designed classes are key for loosely coupled and modular code in Java.
6) Class doesn't do anything special, it's just defined structure and object do all the things.
See my presentation on What is class in Java for more details
That's all on What is Class in Java programming language, there are lot more details which we will discuss in further post. Best way to learn Class and Object is to model some real world things e.g. Person, Student, Employee etc.
Related Java and OOPS programming Tutorials
What is abstraction in Java programming language
What is Encapsulation in Java with Example
What is polymorphism in Java? method overloading or overriding
What is Inheritance in Java with Example
Difference between Abstraction and Encapsulation in Java