Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduction #1

Open
github-learning-lab bot opened this issue Oct 4, 2021 · 2 comments
Open

Introduction #1

github-learning-lab bot opened this issue Oct 4, 2021 · 2 comments

Comments

@github-learning-lab
Copy link

Java Course

Java is a popular programming language for several main reasons:

  • It workes on many different platforms.
  • It's easy to learn and open source.
  • It's fast and powerful.

Java is considered an Object Oriented programming language, making it easy to encapsulate data (and methods) in a class. A class is like a blue-print that contains all the properties that will be inherited by the objects created by it. This makes it easy to organize and re-use blocks of code.

Java is also a compiled language, meaning that it needs to be translated into machine readable code before it can run.

GitHub Learning Lab Instructions

This is an interactive course, where you will be prompted to do something to finish each step.

If it takes more than a few seconds for a response, try refreshing your browser.

Add a comment to this issue with the letter that answers this question.

Which of the following is false about Java?

a. Java is an Object Oriented programming language
b. Java is a scripting language, read only in the browser
c. Java files need to be compiled before you can run them

@dmayers340
Copy link
Owner

b

@github-learning-lab
Copy link
Author

Correct! That answer is describing JavaScript (which is entirely different than Java).

Prepare your environment

Before we can start writing Java, we need to make sure you have your environment set up. You just need a few things (some of which you might already have!)

  • Check if Java is installed and set path
  • Download a text editor
  • Clone your course repository using git

Check that Java is installed

Your machine may already have Java, or you might need to install it. To find out, go to your command line terminal and type:

java -version

Then type:

javac -version

If you see your Java version displayed for each of these, you're all set!

Otherwise, you'll need to download Java for your operating system.

The next step is to set the java file path by developing a new environmental variable. Go to the link above for instructions on how to find and set the path for Java. (if you already have a path variable, you can add a ; to the end and include the next path afterwards).

When you make a new environmental variable, you need to close and re-open your terminal. Do this now, then type these lines to make sure the path was set correctly.

java -version
javac -version

You should see a version for each of these if it was correctly installed.

Download a text editor

Make sure you have a text editor installed before proceeding (such as Atom, Sublime Text, or Notepad++).

Clone course repository

You will be storing the code for this project in this repository. Before we go any further, clone your template project into the directory you want to store your code locally in, using git:git clone https://github.com/dmayers340/java-course.git

To test that your project is set up correctly, navigate into the folder you cloned and run these commands:

javac custom_order.java

java custom_order

If everything was set up correctly, you should see "Hello World!" printed in your command terminal. We'll describe what we just did in the next step.

When you have finished these steps, leave a comment for the next step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant