473,738 Members | 4,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Novice programmer help?

I have a question

please this is just theory at the moment I am a novice java programmer

Is it possible for me to write information to a hashmap and then once it has
been written to extract a certain piece of information in that hash map and
store it in a variable

then manipulate the information stored in the variable and then put the
information from the variable back into the hashmap in the place that i got
it from

basically I have to be able to have something like this in the hasmap

Product1 ProductName 10

I want to take the 10 store it in a variable

then decrement the variable and store the variable back in the hasmap so the
hasmap looks like this

Product1 ProductName 9
please dont scare me with some complicated stuff just a hint in the right
direction would be good

Thanks in advance

Christo
Apr 10 '06 #1
1 2544

"Christo" <ch***@no.spam. juststuff.co.uk > wrote in message
news:lP******** *************** *******@bt.com. ..
I have a question

please this is just theory at the moment I am a novice java programmer

Is it possible for me to write information to a hashmap and then once it
has been written to extract a certain piece of information in that hash
map and store it in a variable

then manipulate the information stored in the variable and then put the
information from the variable back into the hashmap in the place that i
got it from

basically I have to be able to have something like this in the hasmap

Product1 ProductName 10

I want to take the 10 store it in a variable

then decrement the variable and store the variable back in the hasmap so
the hasmap looks like this

Product1 ProductName 9
please dont scare me with some complicated stuff just a hint in the right
direction would be good

Thanks in advance

Christo


erm ignore that post, sorry its all wrong
Apr 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1309
by: Internet Citizen | last post by:
I'm a little confused about this: BOOL bTest=_istpunct(147); In my ASCII chart, code 147 represents an open quote symbol, a "curled" quote. But bTest is FALSE (0). It's false whether or not I have _UNICODE defined. But isn't the character referred to by 147 a punctuation symbol? Thanks for any insight, Brad
6
2589
by: AMT2K5 | last post by:
Hello guys. I have a function, cleanSpace . I was told from another source that the problem is, is that the function is acting on constant string literal. To fix this I was told to take the incoming string, copy it to a buffer, work on the buffer and copy the buffer back to the original. I tried but no sucess. The seg fault is shown after the code snippet below.
9
2698
by: AMT2K5 | last post by:
Hello, how would I go about breaking up a string that is returned by a function. After I do that, I will strcpy that data to a class data member . I have the following functions void Account::getPhoneNumber(char st) //Retrieves the phone number { }
12
2258
by: AMT2K5 | last post by:
Hello. I have a file (for a school assignment) with the following format and delimiter format. Each record in the file has the following format: 123423454567987,29873,James,Ha­rry,St. Louis,416-555-5555; "accountNumber,balance,lastNam­e,city,phoneNumber;" Each record is guranteed to be no longer than 350 characters. "balance" is no longer than 20 characters, "accountNumber" is exactly 15 characters and the total number of characters in...
15
1902
by: AMT2K5 | last post by:
Hello folks, I seem to have recieved a segfault within my function but am unsure on how to resolve it. I understand that it means that somewhere something is trying to access memory that is not prohibited or not available. The following function is an overloaded += operator that reads in strings in a record format seperated by comma delimiters except for the last data which terminates with a semicolon. I am adding these records to an...
4
1657
by: trond | last post by:
Hello all, Before I start I'd like to point out that I am a complete novice when it comes to asp.net - My background is in network and operating systems, and although I have been doing a bit of hobby programming in vb.net and web programming in asp/vbscript in the past, I am pretty much a beginner at asp.net. What I'm trying to do, is to take the "PersonalHomePage" starter kit that MS supplies with VS2005 and tweak it a bit, to make it...
1
1025
by: The Confessor | last post by:
For my previous project, I stored persistent data from Structures in three different Random Access files between sessions, but that's not likely to be an option with this one... For starters, I'm trying to become more 'class-aware' with my code in this project. I've declared those global variables which will be written to and read from files in their own class, named VariableTemplate, and instantiated it globally with 'Friend Variable as...
8
6058
by: tik33 | last post by:
I hope that you don't get too offended by the stupidity of my question - but I wasn't sure where else to go. Basically, I'm not a programmer but I have a website which was set up by an internet designer company that has now closed down! It is hosted on a server which is not our own but one of these webhosting servers that you can pay. Basically, I need to change a page with an html form (i'm ok with limited html code) which links to a...
9
1361
by: lilchiko1286 | last post by:
I am taking an intro to C++ course in college. I was assigned a project that i must complete on MS Visual Studio in where I am supposed to prompt the user for a name and then a letter and output the amount of times the letter appears in the word. Like the game hang man. Then I must prompt the user for another letter and repeat the same steps until the user enters a specific key or a sentinel. I am somewhat familiar with I/O, Functions...
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.