This is the lecture note of CS61B - Lecture 1.
Overview
Welcome to CS61B!
This course will teach you
- how to write code that runs efficiently.
- Good algorithms.
- Good data structures.
- how to write code efficiently.
- Designing, building, testing and debugging large programs.
- Use of programming tools.
- git, IntelliJ, JUnit, and various command line tools.
- Java (not the focus of the course!)
This course assumes solid foundation in programming fundamentals, including OOP, recursion, lists and trees. You can learn CS61A if you do not have these concepts.
Hello Java World
Python program vs. Java program
1 | # in Python |
1 | // in Java |
Java is an object-oriented language. Every Java file must contain either a class, interface, or enum.
Static Typing
- Python variables vs. Java variables
1 | x = 0 |
1 | public class HelloNumbers { |
Declaring Functions
- Python functions vs. Java functions
1 | def larger(x, y): |
1 | public class LargerDemo { |