Why do we use this.A_Class
public class HexBoard extends Canvas implements MouseListener {
public Matrix white = null;
public Matrix black = null;
public void init() {
makeMove(0, this.white, this.black);
this.white.setValue(20, 10, 1);
//makeMove(0, white, black)
//white.setValue(20, 10, 1);
}command code gives me the same result, what does "this" acturally do in java?
"this" is a reference to the object whose init() method is being invoked. You also see it used in constructors where it refers to the object being constructed.
Some people use it to make it clear that white as an instance variable as you observe it adds no meaning in that case. It is handy if white also occurs as an argument and in this case it does alter the meaning because there are two different variables involved and "this" differentiates between them:
public void init(Matrix white, Matrix black) {
// "essential" use of this
this.white = white;
this.black = black;
makeMove(0, this.white, this.black);
this.white.setValue(20, 10, 1);
}
Similar Messages
-
I changed my billing info and I keep getting the message to contact support itunes/ww/. I don't know why I have used this card before help
Well, unfortunately, we don't know why either. You need to contact iTunes support at the link you were provided to find out....
Sorry,
GB -
I downloaded app Rxmindme (prescription timer) and it said it downloaded. Why cant I find or get the app to work?? I am buying iphone soon but I wanted to get this app to work on my alienware windows 7computer and then link it to iphone. I found Rxmindme 02.11.00 ipa, (ios App) in my computer but when I try to open it the itune program opens. I see the app in the program and it says its downloaded ------But now what do I do ?----- Please help Ive wanted this type app for a long time to remind me to take all the pills I get from VA hospital.. Thanks
Apps for the iPhone do not run on Windows. You will need the iPhone to run the app.
-
Why do we use only dynamic class loading for JDBC drivers
Hi,
My JDBC experience is that we always use dynamic class loader for drivers.
If we have a well defined package from a vendor, why do we use this dynamic class loading feature for drivers??chandunitw wrote:
Hi,
My JDBC experience is that we always use dynamic class loader for drivers.
If we have a well defined package from a vendor, why do we use this dynamic class loading feature for drivers??Oftentimes, the driver class name is set in a configuration file, not in code. So the thing which processes the configuration file has no idea ahead of time which driver or drivers it will support, so it is not coded specifically for any. So it loads the driver by reflection, since it is given the class name as a string it can use with the reflection API. -
The feature you are trying to use is on a network resource that is unabailable" Why am I getting this message when I try to updaate itunes or quicktime?
Before trying the update again, use Microsoft's Fix it solution at http://support.microsoft.com/mats/Program_Install_and_Uninstall. Use it to uninstall iTunes and Quicktime. It bypasses this not uncommon problem. When the solution finishes, the selected program will be uninstalled. It can take several minutes and I have seen as much as half an hour.
After iTunes & Quicktime are uninstalled, try the update again. -
When I tried to open my Mail app on my IPhone this morning, it opened a list of choices - iCloud, E Exchange, Google, Yahoo, Aol, Outlook. I use Hotmail and it usually opens to my Inbox. Why did it do this and do I choose Outlook and is it safe to sign in?
It sounds like instead of opening your Mail App, you actually opened your Settings App, and were somehow in the 'Add Account' section of Mail, Contacts & Calendars.
Close the apps, and then reopen just the Mail App. -
I get missing plug-in error when opening my online bill which is in PDF format. I am using a 2010 Macbook with the latest version of Safari and Adobe suite installed in my computer. Why do I get this error? What should I do?
In relation to my previous inquiry regarding inability to view a pdf file using Safari...
Is it possible that I can view other online bills from other website but not this particular bill from one specific website?
Sorry if I missed any important point in this article -->Apple Safari 5.1 and Adobe Reader/Acrobat Advisory
Thanks again! -
Why do I get this error when trying to use my bluetooth headset as a listening device? There was an error connecting to your audio device. Make sure it is turned on and in range. The audio portion of the program you were using may have to be restarted.
I may have already resolved this issue buy removing the device from my computer and re-pairing it. It is currently working just fine.
-
Why, when I try to install the latest iTunes update, itsays that I have an "invalid" signature...I have used this same machine and have installed all the previous updates with no problem.
That one suggests the installer has gotten damaged during the download.
I'd first try downloading an installer from the Apple website using a different web browser:
http://www.apple.com/itunes/download/
If you use Firefox instead of IE for the download (or vice versa), do you get a working installer? -
i have a problem: every time when i want to download free apple applications in the apple store, apple store asks me which type of credit card i want to use. Why did it ask this question?
If you are within 14 days of purchase you can still return the iPhone and get the phone that suits your needs, however, I think you will find that no matter which phone you get the content provider will want to know how you are going to pay for future purchases. For Android phones it is Google, and they will certainly want to know.
To create an Apple account without a credit card see: http://support.apple.com/kb/HT2534 -
7.1 update to IPad now unable to use FaceTime and iMessage says could not sign in check your network connection. Why am I seeing this when I am connected?
Check Settings>General>Date & Time>Set Automatically>On. Make sure that the time zone setting is also set correctly.
If that didn't solve the problem, restart your iPad and try again. If that fails, reset your iPad and try again.
Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up. -
In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks
And please help me can type Laos font in it like andrio phone.Hi Cozumel,
Thanks for posting. I'm sorry you're having problems with your bills. I can take a look at this for you. Drop me an email with your account details and a link to this thread for reference. You'll find the address in my profile.
Cheers
David
BTCare Community Mod
If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-) -
Why ..we have to use this ? public static void ? please !
hi ...im ibrahim ..and im new here in java nd new in the forum too ...nd please i would like to know ...why
do we use the method
public static void main (String []args)
i mean why ..static nd why public ..why void ....why main ..nd why (string []args)
...why we use it ...always ....hopefully ..im looking for a very clear answer to this ...issue ..?
please help .......!public - this is the visibility modifier (it means that the body method can be call by any outside method)
static - the method is a static instance of the class. Not sure what exactly it does though.
void - this is the return type. void means that the method returns nothing.
main - the name of the method. It can be anything.
"public static void main" - this is the main method where upon executing the Java program the Java Virtual Machine will try to locate this method within the specifies class to be executed. This is always the first one to run when executing a Java program. None of this word may be changed or the program cannot be run. -
Why I cant use my apple id? error was this apple id has not yet been used in the iTunes store
why I cant use my apple id? error was this apple id has not yet been used in the iTunes store
Log into your account and verify that you have a valid payment method.
-
Why do I get this message: The song "title" could not be used because the oringinal file could not be found. Would you like to locate it?
John Black3 wrote:
Many of my songs in my iTunes Library no longer play. I get this error message: "The song xxx could not be used because the original file could not be found. Would you like to locate it?
this usually happens when a user moves or deletes files in the finder - a sure way to upset iTunes.
did you move or delete files in the finder ?
I cannot locate the song.
if you let iTunes manage your library, all your content will be in <MacintoshHD>/users/<yourname>/music/iTunes/iTunes music (or media)/music. did you look there ? tried a spotlight search ?
if the files are really gone, and have been purchased from the iTunes store, see Downloading past purchases from the App Store, iBookstore, and iTunes Store.
Maybe you are looking for
-
How to configure Oracle Alerts For Sending EMail?
Hi All, I am using Oracle Apps 12.1.1. I am configuring Oracle Alerts to sent a email. for that i have set Unix send mail :/usr/lib/sendmail Mail Database/Server Name:172.16.0.6 Mail Priority:Normal In Accounts: User Name:My User Name Password:******
-
Crystal Reports XI - Installation on Server 2008 r2
I have moved an installation of of Crystal reports from our Windows 2000 machine onto our Server 2008 R2 machine (x64) and am having difficulties getting the program to work. It installs fine, I choose a custom install and selected all components to
-
Regarding Database Performance
Hi All, I have installed *10gR2 on RHEL4 (4GB -- RAM, space is enough)*. One application (oracle ucm) is running on that. Its contains apache and content server. After 2-3 weeks, developers were saying taking long time for opening url. So done gather
-
How to determine the congestion of a website
I want to know whether is there anyway to determine the congestion of the website? I'm tyring to do the animation on the web browser. It will run while it is loading and it will stop when it is done. Does anyone has any idea on how to get the speed o
-
Does DNG Converter 5.6 Alter WB Info of DMC-LX3 RW2s?
I have converted a Panasonic DMC-LX3 generated ".RW2" to DNG using DNG Converter 5.6 for the exclusive purpose of being able to open it in the current version (2.1040) of Rawnalyze. The conversion prodeeds OK, and I am able to view the resulting DNG