如何从文本文件中读取字符串并存储在散列映射中? [英] How do I read strings from a text file and store in a hashmap?

查看:81
本文介绍了如何从文本文件中读取字符串并存储在散列映射中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文本文件就像:



计算机科学

计算机系统提供了所有其他软件应用程序所依赖的基础。系统研究的目标是开发关键的抽象和服务,使软件能够在硬件上高效且可移植地运行。系统组感兴趣的领域包括操作系统,计算机网络,并行和分布式计算以及计算机安全。

Text File is like:

computer science
Computer Systems provides the foundation upon which all other software applications rely. The goal of systems research is to develop the key abstractions and services that enable software to be efficiently and portably run on hardware. Areas of interest to the systems group include operating systems, computer networks, parallel and distributed computation, and computer security.

推荐答案

首先,您需要学习如何使用Google和然后阅读链接上的文章。

要了解如何阅读文件,请以这些链接 [ ^ ]。

了解哈希存储读这个 [ ^ ]。

读完这些文章之后写下你的一些文章自己的代码。如果您遇到问题,请将代码发布到出现问题的位置并明确说明问题,包括任何错误消息。我们很乐意帮助您解决问题。
First you need to learn how to use Google and then read the articles at the links.
For learning how to read a file start with these links[^].
To learn about hash storage read this[^].
After you have read those articles write some of your own code. If you have a problem, post the code where you are having the problem AND clearly state the problem including any error messages. We will then be glad to help you solve your problem.


这篇关于如何从文本文件中读取字符串并存储在散列映射中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆