Skip to content

Instantly share code, notes, and snippets.

View CarlosCorderoSaavedra's full-sized avatar
🎯
Focusing

Carlos Lamb CarlosCorderoSaavedra

🎯
Focusing
  • OdigeO
  • Spain ( Madrid )
View GitHub Profile
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class WeatherDataParser {
/**
* Given a string of the form returned by the api call:
* http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7
* retrieve the maximum temperature for the day indicated by dayIndex
import java.util.ArrayList;
public class Person
{
private String name;
private ArrayList<Person> friends;
public Person(String name)
{
this.name = name;
import java.util.ArrayList;
public class Person
{
private String name;
private ArrayList<Person> friends;
public Person(String name)
{
this.name = name;
import java.util.ArrayList;
public class Person
{
private String name;
private ArrayList<String> friends;
public Person(String name)
{
this.name = name;
import java.util.ArrayList;
public class ListOfPictures
{
public static void main(String[] args)
{
ArrayList<Picture> gallery = new ArrayList<Picture>();
gallery.add(new Picture("degas1.jpg"));
gallery.add(new Picture("gaugin1.jpg"));
gallery.add(new Picture("monet1.jpg"));
import java.util.ArrayList;
public class ListOfPictures
{
public static void main(String[] args)
{
ArrayList<Picture> gallery = new ArrayList<Picture>();
gallery.add(new Picture("degas1.jpg"));
gallery.add(new Picture("gaugin1.jpg"));
gallery.add(new Picture("monet1.jpg"));