So I'm trying to figure out why my get method doesn't pass its test. This is my attempt at the get method: public Value get(Object key) { //Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. for (Pair<Key,Value> item : list) { if (item.key.equals(key)) { return item.value; } } return null; } public Value put(Key key, Value value) { //Associates the specified value with the specified key in the map. for (Pair<Key,Value> item : list) { if (containsKey(key)==true) { //A map m is said to contain a mapping …

Member Avatar
Member Avatar
+0 forum 5

Hi all, I am trying to figure out the code for searching a text file for a word/phrase and then replacing it. Both are user-input values. I've been having a tough time finding some help online because we are required to use get and put, [U]not strings[/U], unfortunately. The controllers we will eventually be programming will require us to know get/put and the other iostream functions well. My thought process is this: For a search term of "the end" to be replaced by "bye bye" 1. My program needs to save "the end" as an array, search[], and "bye bye" …

Member Avatar
Member Avatar
+0 forum 2

How to do a HTTP PUT/DELETE? (Using jquery) . Im making a REST-ful twitter-type aplication using Java Servlets etc... and i have the methods for handling PUT and DELETE, i just need to be able to perform these e.g. when a user submits a form (with the id of the tweet to be deleted, for example). However, forms only support the methods POST and GET hence i was instructed to use jquery, which i am unfamiliar with. Can anyone help me?

Member Avatar
Member Avatar
+0 forum 1

Hello, I have Get() & Put() functions in my VB6 project. It was upgraded to FileGet() & FilePut() but they are not working. I am getting the runtime error as "Unable to read beyond the end of the stream." Eg: FileGet(X, Y, Z) -> I think the parameters are FileGet(FileNumber, Value, RecordNumber). Same for FilePut(). Please inform me how I can change this to make it work in VB.Net. Regards, Simran Kaur.

Member Avatar
Member Avatar
+0 forum 7

The End.