Ch 6: Classes, Methods & Objects in Java

About This Chapter

The lessons in this chapter teach you about classes, objects and methods used in Java. This short chapter can help you understand how and why these particular components are used in the programming language.

Classes, Methods & Objects in Java: Chapter Summary

This chapter's lessons cover objects, methods and classes in the Java programming language. Each lesson offers a concise and straightforward look at the definitions and application of these specific concepts. Our expert Java instructors show you several examples that illustrate these functions of these Java statements and data types. Upon completion of each lesson, you're encouraged to take the accompanying self-assessment quiz to make sure you've properly grasped the material.

This chapter covers the following topics:

  • Class in Java
  • Methods used in Java
  • Objects data types

Java is a trademark of the Oracle Corporation, which is not affiliated with Study.com.

15 Lessons in Chapter 6: Classes, Methods & Objects in Java
Test your knowledge with a 30-question chapter practice test
What is a Class in Java? - Definition & Examples

1. What is a Class in Java? - Definition & Examples

Java is an object-oriented language: at its heart are objects and classes. This lesson will define classes in Java, how they are used, and how classes can inherit information from other classes.

Static Nested Classes in Java: Definition & Example

2. Static Nested Classes in Java: Definition & Example

A static nested class in Java is a class that is defined within another class but retains most of the characteristics of an independent class. Learn why this can be useful in the following lesson.

Inner Classes in Java: Definition & Example

3. Inner Classes in Java: Definition & Example

Java lets you create a class within another class. It's a good way to protect data and limit the scope of your program: This lesson will define the types of inner classes and provide working code examples.

Methods in Java: Definition & Example

4. Methods in Java: Definition & Example

Java programs have methods that have a name and contain a set of statements or instructions. In this lesson, we'll learn how the Java programming language uses methods and the rules and syntax we need to employ when using them.

Static vs. Non-Static Methods in Java

5. Static vs. Non-Static Methods in Java

In Java, a static method belongs to the class. A non-static method, on the other hand, belongs to an object of a class. In this lesson, we will learn more about static and non-static methods in Java.

What is a Main Method in Java? - Definition & Purpose

6. What is a Main Method in Java? - Definition & Purpose

In this lesson you will learn about the special Java method named 'main', the meaning of the arguments passed into it, and how to use them to get your program running smoothly.

What is 'Public Static Void Main' in Java?

7. What is 'Public Static Void Main' in Java?

You'll see it often in Java programs, but what does 'public static void main' really mean? This lesson will cover this core component, a requirement of any Java program.

Java Naming Conventions: Classes & Methods

8. Java Naming Conventions: Classes & Methods

Wouldn't it be confusing if some traffic lights were blue, purple, and pink? Even if you knew to stop on purple or red, it would be a very strange world. The same is true of Java naming conventions. It makes sense to follow a standard. This lesson will cover the accepted conventions for naming classes and methods.

What is a Constructor in Java? - Definition & Example

9. What is a Constructor in Java? - Definition & Example

An object can't be created in Java without a constructor. In this lesson, we will define a Java constructor and look at working code examples of this key building block of object-oriented programming.

Overloading in Java: Methods & Constructors

10. Overloading in Java: Methods & Constructors

Unlike a semi-trailer, an overloaded Java method or constructor isn't necessarily a bad thing. Java allows overloading. It is a useful tool in the Java programmer's toolbox. This lesson will explain the concept and provide working code examples.

Overriding Methods in Java: Definition & Example

11. Overriding Methods in Java: Definition & Example

Overriding in Java is not a legal maneuver. It is a powerful tool that allows you to use existing classes and methods for specific purposes without posing a threat to those methods. This lesson will cover the concept and provide working code examples.

Overloading vs. Overriding in Java

12. Overloading vs. Overriding in Java

Overload or override? These similar-sounding concepts are actually quite different. This lesson will compare the two in the framework of classes and methods. Working code examples will be provided to highlight each function.

Java Data Types: Object

13. Java Data Types: Object

You'll learn about Java objects and the class descriptions which define them. In object-oriented programming, we design and implement a program using objects and classes, manipulating them to achieve your goal.

What is Instantiation in Java? - Definition & Example

14. What is Instantiation in Java? - Definition & Example

Instantiation is a big word to describe a universal and straightforward concept in Java programming: creating new instances of objects to be used in a program. This lesson will define the term and provide real-world examples.

Wrapper Classes in Java: Definition & Example

15. Wrapper Classes in Java: Definition & Example

A wrapper is like a blanket over another Java data type, such as the primitive data types int, char, float, and double. This lesson will define the term and provide working code examples.

Chapter Practice Exam
Test your knowledge of this chapter with a 30 question practice chapter exam.
Not Taken
Practice Final Exam
Test your knowledge of the entire course with a 50 question practice final exam.
Not Taken

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Support