mirror of
https://github.com/Brandon-Rozek/website.git
synced 2025-10-10 15:01:15 +00:00
Website snapshot
This commit is contained in:
parent
ee0ab66d73
commit
50ec3688a5
281 changed files with 21066 additions and 0 deletions
47
content/ta/spring2018/cpsc220/jan16.md
Normal file
47
content/ta/spring2018/cpsc220/jan16.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Lecture for January 16 2018
|
||||
|
||||
## Comments
|
||||
|
||||
You can use multi-line comments or single line comments to note about a piece of code. This helps you so that you don't forget what was happening in the code
|
||||
|
||||
```java
|
||||
/* Multi Line Comment
|
||||
I am multiple lines woo!
|
||||
*/
|
||||
|
||||
System.out.println("Hello"); // I am an inline comment
|
||||
```
|
||||
|
||||
### Javadocs
|
||||
|
||||
This is a standardized method in Java to describe your functions and classes
|
||||
|
||||
```java
|
||||
/**
|
||||
* This is a Javadoc comment. A description of your class should appear here
|
||||
* @author Brandon
|
||||
* @version 2018
|
||||
*/
|
||||
public class Example{
|
||||
/** Another Javadoc comment.
|
||||
* A description of your program should go here
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
Convention in Java is for all of your functions/method names to be lowercase.
|
||||
|
||||
Class names should be title cased, each word is capitalized ex: `IntroExample`
|
||||
|
||||
|
||||
|
||||
## Java API
|
||||
|
||||
The Java API is publicly accessible and is extremely useful for finding methods in existing classes.
|
||||
|
||||
The API documentation for the `String` class is located here: https://docs.oracle.com/javase/8/docs/api/index.html?java/lang/String.html
|
Loading…
Add table
Add a link
Reference in a new issue