Skip to content

Instantly share code, notes, and snippets.

OOPUniversity

Block or report user

Report or block OOPUniversity

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@OOPUniversity
OOPUniversity / Person.java
Created Nov 15, 2015
Demonstration code for the blog post 'Inheritance Part 1 - That Class is Super!'
View Person.java
package com.oopuniversity.basics.classes;
/**
* Created by OOPUniversity on 11/15/2015.
*/
public class Person {
private String firstName;
private String lastName;
public Person(String newFirstName, String newLastName) {
@OOPUniversity
OOPUniversity / ForEach.java
Created Nov 15, 2015
Supporting code for the 'There's a loop for each of us' blog post
View ForEach.java
package com.oopuniversity.basics.loops;
import com.oopuniversity.basics.classes.Person;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* Created by OOPUniversity on 11/15/2015.
@OOPUniversity
OOPUniversity / ArrayPrinter.java
Created Nov 10, 2015
Demonstration code for blog post 'I tried to print my array but all I got was gobbledegook!'
View ArrayPrinter.java
package com.oopuniversity.reddit.javahelp.array_print;
/**
* Created by OOPUniversity on 11/10/2015.
*/
public class ArrayPrinter {
public static void main(String[] args) {
String[] strs = {"a", "b", "giraffe"};
Integer [] ints = { 1, 2, 37, 4 };
@OOPUniversity
OOPUniversity / Arrays.java
Created Nov 9, 2015
Demonstration for 'Arrays of Golden Sun' blog post
View Arrays.java
/*
* Copyright (c) 2014.
*/
package main.java.com.oopuniversity.basics.variables;
/**
* Created by OOPUniversity on 11/15/2014.
*/
public class Arrays {
@OOPUniversity
OOPUniversity / SwitchDemo.java
Created Nov 9, 2015
Demonstration for blog post 'The Old Switcheroo'
View SwitchDemo.java
package main.java.com.oopuniversity.basics.conditionals;
/**
* Created by OOPUniversity on 11/9/2015.
*/
public class SwitchDemo {
public static void main(String[] args) {
switchDemo();
}
@OOPUniversity
OOPUniversity / IfDemo.java
Created Nov 9, 2015
Demonstration code for the blog post 'If I, if I, if I, if I Didn't Love you else I'd Hate You'
View IfDemo.java
/*
* Copyright (c) 2014.
*/
package main.java.com.oopuniversity.basics.conditionals;
/**
* Created by OOPUniversity on 12/2/2014.
*/
public class IfDemo {
@OOPUniversity
OOPUniversity / Booleans.java
Created Nov 9, 2015
Demonstration code for 'Hooray for Boo..leans' blog post
View Booleans.java
/*
* Copyright (c) 2014.
*/
package main.java.com.oopuniversity.basics.variables;
/**
* Created by OOPUniversity on 11/15/2014.
*/
public class Booleans {
@OOPUniversity
OOPUniversity / Booleans.java
Created Nov 9, 2015
Demonstrates basics of using boolean variables in Java
View Booleans.java
/*
* Copyright (c) 2014.
*/
package main.java.com.oopuniversity.basics.variables;
/**
* Created by OOPUniversity on 11/15/2014.
*/
public class Booleans {
@OOPUniversity
OOPUniversity / For.java
Created Nov 9, 2015
Demonstrates simple for loops, including a 'nested' loop which generates a multiplication table.
View For.java
package main.java.com.oopuniversity.basics.loops;
/**
* Created by OOPUniversity on 11/15/2014.
*/
public class For {
public static void main(String [] args) {
for1();
for2();
@OOPUniversity
OOPUniversity / While.java
Created Nov 9, 2015
Demonstration code for post 'Going Loopy a While', outlining the basics of 'while' loops in Java.
View While.java
/*
* Copyright (c) 2014.
*/
package main.java.com.oopuniversity.basics.loops;
/**
* Created by OOPUniversity on 11/15/2014.
*/
public class While {
You can’t perform that action at this time.