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 trialEric De Wildt
Courses Plus Student 13,077 PointsURL syntax error?
I put exactly what I am supposed to put and I get an error
this is what I put
package com.example;
import android.os.Bundle;
import android.view.View;
import java.net.MalformedURLException;
import android.util.Log;
public class MainListActivity extends ListActivity {
public static final String mURL ="teamtreehouse.com";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_list);
// Add Task 2 code here
}
}
and here is the error I get
JavaTester.java:42: cannot find symbol symbol : variable URL location: class com.example.MainListActivity if (!MainListActivity.URL.equals(correctUrl)) { ^ 1 error
2 Answers
Ben Jakuben
Treehouse TeacherI can see how this is slightly confusing. The convention for static
variables is to put them in all caps. I will amend this challenge to remove the word member
from the instructions.
Eric De Wildt
Courses Plus Student 13,077 PointsI am just so impressed by not only how fast you responded, but that you actually are changing the wording because of little o'le me. You guys are doing a great job and I thank you for it!
Ben Jakuben
Treehouse TeacherEveryone at Treehouse is here because we care about teaching and helping students! Glad to be of service.
Eric De Wildt
Courses Plus Student 13,077 PointsEric De Wildt
Courses Plus Student 13,077 PointsNever mind I took away the m from mURL and it worked.
I don't know why this worked cause i was told to declare a member variable not just a variable. But oh well if it works then it works right?