Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Working with JSON Formatting a Date

jinhwa yoo
jinhwa yoo
10,042 Points

help me plz CurrentWeather.java

package jinhwa.come.stormy;

import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone;

public class CurrentWeather { private String mIcon; private long mTime; private double mTemperature; private double mHumidity; private double mPrecipChance; private String mSummary; private String mTimeZone;

public double getPrecipChance() {
    return mPrecipChance;
}

public void setPrecipChance(double precipChance) {
    mPrecipChance = precipChance;
}

public void setSummary(double summary) {
    mSummary = summary;
}

public String getTimeZone() {
    return mTimeZone;
}

public void setTimeZone(String timeZone) {
    mTimeZone = timeZone;
}

public String getIcon() {
    return mIcon;
}

public void setIcon(String icon) {
    mIcon = icon;
}

public long getTime() {
    return mTime;
}

public String getFormattedTime(){
    SimpleDateFormat format = new SimpleDateFormat("h:mm a");
    format.setTimeZone(TimeZone.getTimeZone(getTimeZone()));
    Date dateTime = new Date(getTime() *1000);
    String timeString = format.format(dateTime);
    return  timeString;
}
public void setTime(long time) {
    mTime = time;
}

public double getTemperature() {
    return mTemperature;
}

public void setTemperature(double temperature) {
    mTemperature = temperature;
}

public double getHumidity() {
    return mHumidity;
}

public static void setHumidity(double humidity) {

}
}

public double getPrecipchance() {
    return mPrecipChance;
}

public void setPrecipchance(double precipchance) {
    mPrecipChance = precipchance;
}

public double getSummary() {
    return  mSummary;
}

public void setSummary(String summary) {
    mSummary = summary;
}

what's wrong???

I can not find out where debug is ....

Movie.java
import java.util.Date;

public class Movie {

    private String mTitle;
    private Date mReleaseDate;

    public String getTitle() {
        return mTitle;
    }

    public void setTitle(String title) {
        mTitle = title;
    }

    public Date getReleaseDate() {
        return mReleaseDate;
    }

    public void setReleaseDate(Date date) {
        mReleaseDate = date;
    }
}
Lukas Baumgartner
Lukas Baumgartner
14,817 Points

You have a curley bracket to much at

public static void setHumidity(double humidity) {

}
}

I hope that was the reason why :)