将数据合并到java的链表节点中。 [英] Incorporate data in java's linked list node.
本文介绍了将数据合并到java的链表节点中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我想让一个类调用员工包含名称和工资。但我不确定如何将它们放入节点。我不想从头开始制作节点类......你能指出一些提示吗?
解决方案
从这里开始:
http://docs.oracle.com/javase/tutorial/java/ index.html [ ^ ]
我建议将该页面加入书签。
代码:
请自行编码,这是我们不提供的经典作业。
您可以询问具体,但我们不会给您代码。
通常,链接列表节点
是类包含
- 一些数据(例如员工姓名) '和'薪水',在你的情况下)
以及
- 对下一个节点的引用列表
So I want to make a class call employee to contains the name and salary. But I'm not sure how to put those into the nodes. I wouldn't want to make node class from scratch... Could you guys point out some tips?
解决方案
Start here:
http://docs.oracle.com/javase/tutorial/java/index.html[^]
I recommend to bookmark that page.
For the code:
Please code yourself, this is classic homework, which we do not provide.
You can ask specific, but we will not give you code.
Typically, a linked listnode
is a class containing
- some data (e.g. employee 'name' and 'salary', in your case)
as well
- a reference to the next node in the list
这篇关于将数据合并到java的链表节点中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文