albertlee
Senior Members-
Posts
1259 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by albertlee
-
windows vista no internet connection problem
albertlee replied to albertlee's topic in Computer Help
thanks for the replies to cap: I have disabled all my firewalls, but problems still appear. to insane: I always use the administrator privilege to open up my programs, by right clicking their icons and select the open with administrator privilege option. I can definitely access the Internet on IE. BUT, I can't even do a "ping" command on the command prompt in Vista. This is indeed very strange, since if there is connection, "ping" command should always work. That is, I can't ping a host like google or yahoo for example, but the strange thing is I can ping and get response from my ISP's DNS server. Any help or explanation to my problem? thanks -
I have this problem. None of my programs on my Vista can access the Internet except Microsoft Internet Explorer. My vista version is Basic, installed on a laptop. Any one can help? thanks
-
For the transition metal element Cr why are there 5 electrons filling the 3d orbital and only 1 electron filling the 4s orbital? I initially think that there should be 4e in 3d and 2e in 4s Why is my way of electron configuration less stable than the one in the question? please help thanks
-
It needs a force pushing the car towards the center... However, that force is a component of the normal force............
-
One question, why does the normal force of a car on a banked road is actually greater than the downwards mg newtons of the car? shouldn't the normal force be simply a reaction force to one of the components of the weight of the car? please help~~~thanks
-
alright...thanks dave
-
say, on a graphic of cubic function, there is a root at 2, a y point on 8 when x is 1, and another on 8 also when x is -1, and when x is 0, y = 8. 1) if I solve this by: (x-2)(ax^2+bx+c).... I get an answer because I can solve a, b, c by 3 different simul equations. but 2) if I solve this by: (x-2)(ax+b)(x+c), I get more answers because when I try to solve c, I get a quadratic equation for it, which means c can have 2 values...... but this cannot be possible, since c can only be one value as a root. plz help
-
one little question on regarding generic method in Java....
albertlee replied to albertlee's topic in Computer Science
thx Aeternus...but can you help me with other questions on this thread? Which refer to the 2nd, 3rd, and 4th posts here. thx -
one little question on regarding generic method in Java....
albertlee replied to albertlee's topic in Computer Science
btw, why I cant compile this code? public class b{ static class a{} static class b1 extends a{} static class c extends b{} static <A extends b.a> void adds(LinkedList<A> l, A b1){l.[b]add(b1)[/b];} static public void main(String[] sfg){ LinkedList<c> l = new LinkedList<c>(); adds(l, new c()); } } and the problem originates from the bold part of the code above....during compile time. Please help thx -
one little question on regarding generic method in Java....
albertlee replied to albertlee's topic in Computer Science
3rd question... Simply put, why cant we declare an array of generic types??? please help, along with the 2nd question... thx -
one little question on regarding generic method in Java....
albertlee replied to albertlee's topic in Computer Science
ok... I understand the 1st question...please ignore... for the second question, an example is: static <T extends Shape> void draw(List<T> l) {drawOnCanvas(l.get(0));} versus static void draw(List<? extends Shape> l) {drawOnCanvas(l.get(0));} The above code should elaborate what I mean! please help thx -
one little question on regarding generic method in Java....
albertlee replied to albertlee's topic in Computer Science
btw... Can any explain, with examples, the real difference between wilcard type method and generic type method in practice? The only thing it seems to me is that generic type is more concrete, hence we can, for example, add elements to a collection while with wildcard type, we are like assuming to take any thing unknown.... please help -
Ok, so... When will the hashcode of k2 really be changed to "1" in the HashSet?
-
Ok... sorry, forget about my last post. Weird, it did work like the day before yesterday, now I get a compile time error, as you said. Any way, protected class A{ int a; static int b; void meth1(){}; static void meth2(){}; } is the above code equivalent to the below one in terms of accessibility? public class A{ protected int a; protected static int b; protected void meth1(){}; protected static void meth2(){}; protected A(){}; } btw, why cant you use "private" modifier to a class? plz help thx
-
NO you dont.... Strange, you said you cant compile Booga.java (which is in my case, the Test.java), but I CAN!!! Let me try again...
-
and, also, please help me with questions (easy) 7 and 4. thx
-
oh sorry... I think I need some sleep... I thought they were both "Square", but I actually overlooked. One of them is "Shape", not "Square".... Any way, please help answering my feedback questions on question 5.... thx
-
why??? this is the implementation of the hashCode method in my posted question: public int hashCode(){return i;} clearly, the method should return "1" not "2".....why would you see it's 2??? can you please explain more clearly why? please help thx
-
Ok... please help me with question 6....Aeternus
-
Aeternus, I think the link you have provided contains a mistake or something at least. "The compiler complains that you cannot pass a List<Square> to an argument that expects a List<Shape>......" The above quote is very wrong.... How cant you add a List<Square> to an argument that expects a List<String>?????
-
thanks for the responses, Aeternus... However, I still dont comprehend the 2nd question... for example: package a; public class fc{ public a aa = new a(); private class a{public int d = 5;} } and import a.fc; public class Test{ public static void main(String[] sref){ fc c = new fc(); System.out.println(c.aa.d); } } In the second code, note that it's in the super directory of directory "a", I can access the varriable d, which is in the private class, without getting any error..... So, again, why does the answer of question 2 is that it's unable to refernce varriable i (which is now d in this case) when the class is outside the package the referenced variable is in? please help thx
-
Question 7: what does it mean by "mutually exclusive" when this term is applied to object lock in threading? for example, "to obtain a mutually exclusive lock on methods of......" plz help thx
-
Question 6: import java.util.*; public class Test { public static void append(List list) {list.add(new Object()); list.add("bbaa"); list.add("1122"); list.add(1234);} public static void main(String[] argv) { List<StringBuilder> intList = [b]new ArrayList<StringBuilder>()[/b]; append(intList); System.out.println(intList.get(0)); System.out.println(intList.get(1)); System.out.println(intList.get(2)); System.out.println(intList.get(3)); } } Why there is no runtime error at append(intList)? I know the parameter accepts it, but the instance actually only allows to add elements of StringBuilder type.... please help thx
-
Question 5: public String s(){ [b]String s = "Fred"; s += "47"; s = s.subString(2,5); s = toUpperCase();[/b] return s.toString(); } how many String objects are created when the method s is invoked? my answer is 4, but the correct one is 3...why? As you see in the bold section of the code block, each line will create a new String, since String is immutable... plz help thx