Hi All, I came across this question in Cathy Siera SCJP book and the answer is really Strange and i dont understand. The question is below. class A { } class B extends A { } public class Comingthru { static String s ="-"; public static void main(String[] args) { A[] aa = new A[2]; B[] ba = new B[2]; sifter(aa); sifter(ba); sifter(7); System.out.println(s); } static void sifter(A[]... a2) { s += "1"; } static void sifter(B[]... b1) { s += "2"; } static void sifter(B[] b1) { s += "3"; } static void sifter(Object o) { s += "4"; …

Member Avatar
Member Avatar
+0 forum 2

I want to determine if the mouse cursor is above a Windows Form and if so, change its color, but I'm kind of new to this and C# also. I was thinking of something like this: public Form1() { InitializeComponent(); if (Control.MousePosition.Y >= 0 && Control.MousePosition.Y <= 499 && Control.MousePosition.X >= 0 && Control.MousePosition.X <= 297) this.BackColor = Control.DefaultForeColor; } but it does not work. Can anyone give me a hand? Thanks.

Member Avatar
Member Avatar
+0 forum 7

Hello, Today I was working on my home Pc. As I work my 2nd job from home. I was working away and clicked some random news site and all of a sudden Mcfee says they have blocked a trojan, and then get a little box pops up wanting me to approve windows to run something I click no and keep working. The box keeps popping up. <br Mind you the `internet is working fine at thi `internet is working fine at this point. I restart my PC in safe mode with networking, to run a virus scan. I notice my …

Member Avatar
Member Avatar
+0 forum 1

Hi there, the text headings in the right hand column here are hanging to the left outside of the column. Any ideas as to how I can stop that happening and pull them back in? http://www.wannalearnmusic.com/tom/

Member Avatar
Member Avatar
+0 forum 5

Hello I am currently working on this code and the code can be runned well from 100-10,000 random elements after that the heap sort says stack over flow, im thinking the recursive calls are the cause of this, so please healp public static void MAX_HEAPIFY(int [] A, int i, int n) { int l = i + 1;//sets the left tree root int r = i + 2;//sets the right tree root int largest = 0; if(l <= n && A[l] > A[i]) { largest = l; } else { largest = i; } if(r <= n && A[r] > …

Member Avatar
Member Avatar
+0 forum 3

The End.