Search lessons

Suggested searches

Browse

Java

This year, we will be using Java to write our robot code. We have used C++ in the past, but made the decision to switch to Java. Here are a few references:

IDEs

Java programs are usually written in an IDE, or Integrated Development Environment. For robot programming, we'll be using the text editor Visual Studio Code. However, we cannot install IDEs on Chromebooks, so for now, we will be using an online cloud based IDE called repl.it.

repl.it

Go to repl.it. Type Java in the center box and click "Java". On the left you will see your files, in the center is your code, and on the right is your code output. You can push the "Run" botton at the top to run your code.

If you want, you can create an account. This will allow you to save your projects and share them with other people.

Why We Use Java

  • Many other teams use Java, giving us more reference material
  • In general, people have stated that Java is easier to learn

Curriculum

Don't worry if you have no clue what these things are, we will go over all of them and try our best to teach you them. Anything with a star (*) next to it is not required, but it would be nice to know.

  • Basics (1 day)
    • First Program
    • Variables
    • Operators
    • Comments
  • Control-Flow (1 day)
    • If/Else Statements
    • Logical Operators
    • Switch Statements
    • While Loops *
    • For Loops *
    • Enums
  • Functions (2 days)
    • Basic Functions
    • Functions w/ Arguments
    • Functions w/ Return Types
    • Overloading *
  • Objects (2 days)
    • Objects
    • Classes
    • Inheritance
    • Overriding
    • Polymorphism *
    • Abstract Classes *

Once we finish these topics, we will go onto robotics programming.

Warning

This documentation teaches you a lot about making programs in Java, but it does not go fully in depth. After build season, we might teach extra things so that people can learn more about the Java language.

Help

If you need help, don't feel shy to ask a senior member or the captain about any programming questions. It is difficult to learn programming in under a few months, so don't feel bad about any difficulties you are having. Good luck!

Typos

If you find any mistakes, tell me, or even better, after we learn Git, make an issue and/or pull request on GitHub to notify me of the problem.