Intro to FRC Programming - Romi
  • INTRODUCTION
    • Overview
    • Important Links
  • 💽Setup
    • Setting up the Romi's Software
    • Downloading Essential Tools
    • APCS vs FRC
  • How To Code in VSC
    • VSC- Intro
    • A Tour Through VSC
    • Creating a Regular Java Project
  • Intro to Java
    • What is Java?
    • Beginning Steps
    • 🟩Fundimentals of Java
      • Variables
      • Operations
      • Methods
      • Comments
      • If Statements and Conditions
      • Boolean Zen
      • Loops
      • Challenge- Create a Box House
    • 🟨Advanced Concepts
      • Objects
      • Scanners
      • Null Objects
      • Arrays
      • Errors
      • For-Each Loops
    • 🟥Object Oriented Programming
      • Basics of OOP
      • Instance Classes
      • Static Classes
  • 🕑Romi Curriculum- Timed Base
    • Romi Curriculum- Introduction
    • Creating a WPILIB Project
    • Running Your Code
    • The Robot Class
    • Subsystems
      • RomiDrivetrain
    • Cool stuff i will rename this category later
      • Spark Motors
      • PIDs
      • External Controllers
      • Encoders
  • 🖥️Romi Curriculum- Command Based
    • Command Based Code
    • RobotContainer
    • Commands
    • CommandScheduler
  • UNRELATED IMPORTANT CODING KNOWLEDGE
    • Constants
  • SAMPLE CODE
    • Tank Drive Example
      • RobotContainer
      • TankDriveSubsystem
      • MoveRobotCommand
    • Worktop Systems Sample Java Code
      • Belt Elevator Sample Code
      • Rotating Arm Sample Code
Powered by GitBook
On this page
  • Object Oriented Programming
  • JVM + Code Once Policy
  • Tips for Java (and for programming to some extent)
  1. Intro to Java

What is Java?

Welcome to Java! Java is a popular language known for its modularity and reliability. As of 2024, 30% of all coders use this.

Object Oriented Programming

Java uses classes and objects to handle data. Data is stored in classes,

JVM + Code Once Policy

You can copy code over from one device to another one and it'll run properly (This was revolutionary back in the 90s).

Tips for Java (and for programming to some extent)

  • COMMENT YOUR CODE. Comments are there so other programmers can understand your code. Stick them in important sections, like method/class headers and any confusing logic.

  • Declare all of your variables at the method header. It's so much easier to have all of your variables in one spot rather than searching around your thousand-line file, looking for a specific important variable (definitely not from experience).

  • Private your variables. (put the word private before data types when creating variables). This prevents other files from accessing your variables, and potentially changing their contents. Although this wouldn't be too useful for coding a robot, this is just a good Java habit. (more detail in Basics of OOP

  • Make your code as simple as you can. It'll help you when you'll inevitably modify your code.

PreviousCreating a Regular Java ProjectNextBeginning Steps

Last updated 1 month ago