Skip to content

Instantly share code, notes, and snippets.

View rooksoto's full-sized avatar

Rafael Adam Soto rooksoto

View GitHub Profile
class Main {
public static void main(String[] args) {
System.out.println("My name is Rafael Soto.");
System.out.println("I drove here from The Bronx.");
System.out.println("Yesterday, I learned how surprisingly weak uncooked spaghetti is.");
System.out.println("Today, I just want to learn more Java!");
}
}
class Main {
public static void main(String[] args) {
// ***** Q1 *****
// https://docs.oracle.com/javase/7/docs/
// ***** Q2 *****
//The languages are very loosely related, historically, but much different in purpose and implementation. Java is a compiled language, where Javascript is a scripted language. Java is much more verbose, Javascript is, relatively speaking, pared down. Java is statically typed, where Javascript variables are dynamically typed. Java is much more general purpose, Javascript is mainly utilized for web applications (although Node.js makes it possible to use Javascript for server operations and general purpose scripting).
// ***** Q3 *****
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//Q1. add-function Call
add(1, 2);
//Q2. age-calculator Call
calculateAge(1987, 2016);
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//Q1. add-function Call
add(1, 2);
//Q2. age-calculator Call
calculateAge(1987, 2016);
package nyc.c4q.rafaelsoto;
public class Student {
String firstName;
String lastName;
int idNumber;
String favFood1;
String favFood2;
String favFood3;
@rooksoto
rooksoto / Main.java
Created August 30, 2016 00:20
In class exercises for 08.29 - Rafael Soto, 3327
package nyc.c4q.rafaelsoto;
public class Main {
public static void main(String[] args) {
//Q1. Triangle
drawTriangle(4);
System.out.print("");
{
"Class": "Student",
"First_Name": "Rafael",
"Last_Name": "Soto",
"ID_Number": 123456789,
"Favorite_Foods": [
{
"First_Fav_Food": "Pizza"
},
{
package nyc.c4q.abassawo;
import java.util.HashMap;
import java.util.Map;
public class LameParkingGarage {
private Map<Integer, AbstractCar> map;
public LameParkingGarage(int numberOfFloors) {
@rooksoto
rooksoto / ArrayLeftRotationSolution.java
Created January 8, 2017 01:06
HackerRank Cracking The Coding Interview #1
/**
* Created by rook on 1/7/17.
*/
import java.util.*;
public class ArrayLeftRotationSolution {
/*
Renamed some variables to make it easier