-
Notifications
You must be signed in to change notification settings - Fork 48
Compile time vs Run time Summary
Jed edited this page Nov 29, 2020
·
5 revisions
Compile-time | Run-time | |
---|---|---|
Type | Left hand side of the assignment, fixed upon declaration |
Right hand side of the assignment, vary as program runs |
Binding | Static | Dynamic |
Control | Restricts methods that can be called based on compile-time type | Methods to invoke are determined during run-time |
Check for | Method overloading, more specific method will be invoked |
Method overriding, overridden method will never be invoked |
What happens during Compilation Time in Java?
- Type Inference
- Inferring the type of a variable whose types are not defined.
- Type Erasure
- Replacing a type parameter of generics with either Object or its Bond.
What happens during Run Time in Java?
- Type Checking
- Checking if the value matches the type of the variable it is assigned to. It happens during run-time since the value is not always available at compile time.
- Late Binding
- Determines which instance method to call depending on the type of a reference object.
Exceptions
- Type Casting
- Converting the type of one variable to another.
- Happens during Compile time but checked during run time.
- Accessibility Checking
- Checks if a class has access to a field in another class.
- Happens in both Compile and Run Time.
Peer Learning
Codecrunch Contributions
Piazza Contributions
Wiki Contributions
Guides
Setting Up Checkstyle
Setting Up Java
Setting Up MacVim
Setting Up Sunfire
Setting Up Unix For Mac
Setting Up Unix For Windows
Setting Up Vim
Setting up SSH Config
CS2030 Contents
Lecture 1 SummaryCompile-run vs Run-time Summary
Quick Guide To Abstraction
Generics and Variance of Types
Comparable vs Comparator
Summary of completable future
CS2030S Notes
ELI5 Optional.map vs Optional.flatMap
PECS Example Code
Java Collection Framework (Iterator)
Generic
Generic Type Parameter and Generic Wildcard
Calculator
Lambda-Expression
Single Abstract Method (SAM)
Method Reference
Functional Interfaces 2
Simple Usage of Sandbox
Associative-but-not-commutative
Higher Order function
Functional Programming
Calculator With Functor
Eager Evaluation VS Lazy Evaluation
Simple Usage of Lazy Evaluation
Lazy Evaluation for LazyList
Lazy Evaluation for BinaryTree
Stream
Parallel Stream
Optional
Simple Usage of Stream
Asynchronous Programming
Notes on CompletableFuture
Notes on CompletableFuture 2
Simple Usage of CompletableFuture
Mind Map
Exception Handling
Links
CS2030 Java Style Guide
CS2030 Javadoc Specification
JDK 11 Download Link
JDK 11 API Docs
Codecrunch
Piazza Forum