Can someone tell me how I can use a Vector to access my class?
I wrote a class that will need to be instantiated with unknown instances later. I decided to use a Vector to do this. However when I created the vector:
<CODE>
Vector user = new Vector(1,1);
user.addElement(Users());
user.elementAt(0).name="Test";
</CODE>
I'm really not sure how I can set this. The class is of course Users and I want to set user as the Vector but specify Users as the Object Type. Any help? By the way I heard Java has a dynamic array feature is this true? I heard you had to use Vectors for Java. Also how can I free up the memory when I'm done with the class?
Suppose class User looks like this:
public class User
public String name;
}then you could do:Vector users = new Vector(1,1);
users.addElement(new User());
((User)users.elementAt(0)).name="Test";BTW - Java is NOT C++, you always need to use the new keyword for object creation!
Similar Messages
-
Can someone tell me how to make my screen full size on my Mac OSX 10.6.8. using safari. I know this is a simple question. I have always had it on full screen and recently had it worked on remotely and now I can't get the screen back to full size. I appreciate any advise you can offer. Thank you
from the BetterTouchTool blog, older versions can be obtained using these links:
The last 64bit Snow Leopard (10.6 ) version (v 0.939 ) can be downloaded here
<http://bettertouchtool.net/btt0.939.zip>
If you are using an older 32bit Mac you’ll have to use this version: 0.785
<http://bettertouchtool.net/btt0.785.zip> -
Can someone tell me how to access Illustrator CC on the cloud. I currently have CC 2014 but I do not want to use it since it is extremely slow for me.
The Cloud is a delivery process... you still install the program(s) on your computer, and then pay a subscription fee to use the program(s)
Cloud Plans https://creative.adobe.com/plans
-and subscription terms http://www.adobe.com/misc/subscription_terms.html
-Cloud status check 30-or-99 days https://forums.adobe.com/thread/1549838
OR buy the 3 year old version which is a one time payment Creative Suite 6 -
I would like to store my music files on a external harddrive when using itunes instead of my internal drive but can't seem to configure the computer to do this. can someone tell me how ? .
Copy the entire /Music/iTunes/ folder to teh external.
Hold Option and launch iTunes.
select Choose library... and select the iTunes folder on the external.
Make sure the external is connected and ready before launching iTunes. -
I keep getting this error when I try to download apps or songs : MZCommerce.CreditBalance Mismatch.Mobile_message Can someone tell me how to get rid of this? It is very aggravating when trying to use the IPAD.
Try to go to Settings and then Store. Tap to your Apple ID and select View Apple ID. Now choose to check your payment information and when you're done tap Done. I had to rewrite my three digit code of the credit card and now it works.
Oh, I also activated Genius for Apps but I don't think it makes any difference. -
I am currently using iPhone 5 and changing to iphone 6 in sometime. I have taken backup of my photos, videos, contacts, notes and whatsapp. The only thing that remains is my iMessage. Can someone tell me how to backup and restore my iMessages?
iMessages are backed up in the normal backup of your phone so it will be restored when you restore the backup.
-
In the new iOS7, Having trouble figuring out how to forward text messages. Can someone tell me how to do that? Where the forward button. You used to be able to hit forward and put radio button on all the messages. The screen looks blank to me.
In the new iOS7, Having trouble figuring out how to forward text messages. Can someone tell me how to do that? Where the forward button. You used to be able to hit forward and put radio button on all the messages. The screen looks blank to me.
-
.mac mail - I still use my .mac email address to access itunes, icloud, etc. Every once in a while, apple sends me confirmation, reservation, etc. emails to the .mac address. Can someone tell me how to access that email account?
Hi pjerl,
Depending on when you originally set up your Apple ID, you may have @mac.com, @me.com, and @icloud.com email addresses associated with your account, but all mail sent to those addresses should still come in to the same iCloud account (you can test this to make sure by sending yourself emails at those addresses). You may find the following articles helpful:
iCloud: About your @icloud.com, @me.com, and @mac.com email addresses
iCloud: Using your @icloud.com email address
Regards,
- Brenden -
Can someone tell me how I can plug my nano 5th gen into the sound system at my gym? I lead a zumba class, and I use music. I can't find any place on the nano itself that I would be able to plug it into the sound system. Thanks!
Connecting iPod to your home or car stereo -
Can someone tell me how to get my apps that are on my ipad to appear on my TV using Apple Tv
Can someone tell me how to get my apps that are on my IPad to be viewed on my Apple TV?
Welcome to the Apple Community Coachcad.
Basic AirPlay: Assuming both devices are on the same network and that AirPlay is not turned off on the Apple TV, then simply tap on the screen when you are watching content you wish to stream to your Apple TV, then tap the airplay icon that appears in the control bar, choose the Apple TV from the menu that appears.
Mirroring: When displaying the content you wish to mirror on the iPad 2 (or better), iPad Mini, iPhone 4S (or better), swipe from the bottom of the screen, tap the AirPlay icon and choose your Apple TV from the list of devices (iOS 7 or better) or double tap the home button (quickly) and swipe the bottom row of apps to the right to reveal the playback controls, tap the AirPlay icon and select your Apple TV from the list of available devices (pre-iOS7) -
Since upgrading to 4.0, my email settings have been changed so that the reply cursor appears at the bottom of the sender's message instead of the top. I hate this change - please can someone tell me how to change it back?
This is a carrier feature.
Contact your carrier -
Please can someone tell me how to save a MP3 file from my email on my iPad so I can put it on Faceboo? I use hotmail and please tell me step by step as I am not a tech guru lol. Thankyou
Hi jscher200,
Thank you for your reply, sorry for the VERY late late response, but I have just figured out how to control this separate 'panel'. I find it really useful for monitoring Google Analytics in as it can just sit there running. It does have its limitations, as it's a limited size (you can't expand it to full screen view), so you can only ever see a vertical section of a website and need to scroll to look to the right or left, but I have the live view of people accessing my website running on there and if the numbers start racking up at any time, I can scroll to look and see what pages they are accessing, where they've been referred from, etc.
To get it to work, you save a website address in the Bookmarks Toolbar and when you can see it sitting on the toolbar at the top of the screen with its little icon, right click on it then click 'properties', then tick the box 'Load this bookmark in the sidebar'. The next time you click on this bookmark to open the website, it will load in this sidebar, which looks like a separate 'window' but is immovable. You can only have one sidebar application running at a time, but can change it by right clicking on the bookmark you want to load in there and it will then change to that one next time you click on that bookmark.
I hope this might be useful to others, as I asked for help with this on loads of forums and not one person knew that this existed - even really skilled techies! -
Can someone tell me how to connect my iphone 4 to my TV ? many thanks I'm new to this 4
Can someone tell me how to connect my iphone 4 to my TV ? Many thanks I'm new to all this
http://store.apple.com/us/product/MC748ZM/A/apple-composite-av-cable?fnode=45
for a wired connection you can use this, there is also the option for airplay if you have apple tv -
Can someone tell me how to find my photos?I backed up my iPhone but Photostream was not on.pictures are not on my laptop so where did they go?
Welcome to the Apple Community.
Backing up does not transfer your photos to your computer, if you don't want to enable photo stream, you will need to transfer your photos when your device is connected to your computer using iTunes. -
Can someone tell me how to delete my account
Can someone tell me how to delete an iTunes account?
Just stop using it.
All purchases made by that account will always be tied ot that account.
Maybe you are looking for
-
Exposure control in Vision Builder AI
Hello, is there any way of adjusting the exposure time and/or gain of a NI17xx camera programmatically ??
-
How to make Profit Center Mandatory
Dear Sir, We are using New GL functionality in ECC-6 . During Document Splitting we desire that Profit Center must be mandatory , so that no entry is posted in "Non Assigned Profit Center" Kindly guide us as how can we make Profit Center mandatory .
-
What's slowing down Safari 4.0.3 ?
Lets say a site has 43 items. Safari will load 42 in the blink of an eye and then take forever (2 to 5 min.) to load the last item (as per the Status Bar at the bottom of the window). Same thing happens if a site has 240 items; Safari loads 239 faste
-
Is it true Creative Cloud is only needed if renting Adobe software?
I do not rent any Adobe programs. I own a copy of Adobe Acrobat Pro IX, and Elements. Since these programs are not rented; then is it correct Creative Cloud is useless here? The Apple computer I use has Creative Cloud always coming up at start up. Is
-
Parent Total and Parent Currency Total
Can you please explain the what is the parent total and parent currency total ... please correct me if this wrong parent total is the total of the previous level plus any adjustments applying to the specified parent the parent curr total is the total