This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ***** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nyc.c4q.rafaelsoto; | |
public class Student { | |
String firstName; | |
String lastName; | |
int idNumber; | |
String favFood1; | |
String favFood2; | |
String favFood3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nyc.c4q.rafaelsoto; | |
public class Main { | |
public static void main(String[] args) { | |
//Q1. Triangle | |
drawTriangle(4); | |
System.out.print(""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Class": "Student", | |
"First_Name": "Rafael", | |
"Last_Name": "Soto", | |
"ID_Number": 123456789, | |
"Favorite_Foods": [ | |
{ | |
"First_Fav_Food": "Pizza" | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package nyc.c4q.abassawo; | |
import java.util.HashMap; | |
import java.util.Map; | |
public class LameParkingGarage { | |
private Map<Integer, AbstractCar> map; | |
public LameParkingGarage(int numberOfFloors) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by rook on 1/7/17. | |
*/ | |
import java.util.*; | |
public class ArrayLeftRotationSolution { | |
/* | |
Renamed some variables to make it easier |