loader image
Skip to main content
If you continue browsing this website, you agree to our policies:
x

Topic outline

  • Unit 3: Java in Practice

    Now that you have a basic understanding of object-orientation, we'll move on to the practicalities of Java, which is the programming language we'll be studying. The Java-related concepts you will learn in this unit are in many cases directly transferable to a number of other languages. We will begin by learning about "Hello World", a basic software application that simply prints "Hello World" to the screen as a means of demonstrating the most essential elements of a programming language, and will then move on to discuss variables, literals, data types, and operators. In addition, we will also learn about two different styles of adding comments to the code. By the end of this unit, you should have an understanding of Java basics and be prepared to apply those concepts later in the course.

    Completing this unit should take you approximately 9 hours.

    • Upon successful completion of this unit, you will be able to:

      • write Java classes using file naming conventions;
      • use pre-written Java classes from various packages in the Java API;
      • explain and use primitive data-types in Java;
      • declare and use variables of different data types while writing Java programs;
      • perform various mathematical operations using +, -. *, /, and % operators; and
      • use String class and its methods while writing Java programs.
    • 3.1: Compiling and Executing a Java Program

      • This chapter provides step-by-step instructions of writing a Java program using a text editor, and then compiling and running this program from command prompt. Several Integrated Development Environments (IDEs) are mentioned in this chapter. We have already installed NetBeans. That and Eclipse are the most popular in Java professional practice.
      • Use this page to quickly review what you've learned so far.

    • 3.2: Working with Classes

      • This chapter discusses naming and coding conventions as well as reserved words in Java. When you go through this chapter, you'll get some hands-on experience with writing in Java.

      • Use this page to quickly review what you've learned so far.

    • 3.3: Importing Libraries

      • Java classes and interfaces can be organized into packages to group related types and for name-space management.

    • 3.4: Primitive Data Types

      • This chapter discusses eight primitive data types in Java.

      • Use this page to quickly review what you've learned so far.

    • 3.5: Basic Operations in Java

      • Read this introductory article.

      • Read this chapter, which covers variables and arithmetic operations and order precedence in Java.

      • Read this chapter, which discusses arithmetic operations in greater detail along with solving expressions with mixed data types.

    • 3.6: The String Class

      • Read this section, which introduces the concepts of strings using Python.

      • The String class is used for text manipulation. As you read, you will learn different ways to create Strings, methods to manipulate Strings, the String concatenation operator '+', and about how Strings are immutable.

      • This chapter accompanies the previous one. Read it for even more info on Strings.

    • Unit 3 Assessment

      • Take this assessment to see how well you understood this unit.

        • This assessment does not count towards your grade. It is just for practice!
        • You will see the correct answers when you submit your answers. Use this to help you study for the final exam!
        • You can take this assessment as many times as you want, whenever you want.