求生物大神解答黑光病毒答

寻迁是什么意思?求解答
????????
全部***(共1个回答)
业识的轮转具有身相阶段,经历着生、老、病、死现象,相续不断,这就是佛经所说的“迁流不停”
我们这喊天线子
要打药 不然要把树给你弄焉
亲 如果我的回答对你有帮助,麻烦点下“好评”谢谢,祝天天开心!
这是图片美化工具制作的,可以试试美图秀秀都可以的
这种蜘蛛叫“斑络新妇”,有毒,多见于长江中下游地区,不过毒性较小,被咬后会很痛,但不会有大的危险。
寻常是一个词,就是平常的意思。古时候,寻和常都是长度单位,八寸为寻,二寻为常。后来就比常见,是为寻常。
答: 雀巢力多精奶粉的9:1 GOS益生元组合好专业的术语,是什么意思?
答: 因为他们会认为父母都是对的,就照着去学,所以父母必须要以身作则。
答: 百炼成钢 发奋图强 坚持不懈 迎难而上 一视同仁 一清二白 大义灭亲 大公无私 义无反顾 正气凛然 正直无私 执法如山 刚正不阿 冰清玉洁 克己奉公 严于律己 ...
答: 简单,你相信自己的年轻去复读,再加油一年。
相信自己的实力读自考,考学士学位或研究生。
相信自己的财力读高中,就够了。
相信自己(家)的权力就读成教,又轻松又可...
大家还关注
确定举报此问题
举报原因(必选):
广告或垃圾信息
激进时政或意识形态话题
不雅词句或人身攻击
侵犯他人隐私
其它违法和不良信息
报告,这不是个问题
报告原因(必选):
这不是个问题
这个问题分类似乎错了
这个不是我熟悉的地区求大神解答个问题,在写的过程中我遇了这个问题
让我十分不解 ,就是player player=new player();的问题!
在这类playingCcards下创建player一点问题没有package com_poker_
import java.util.*;
public class playingCcards {
player player=new player();//==============在这没问题========================
List&Cards&
cardsList=new ArrayList&Cards&();
List&player& playerList=new ArrayList&player&();
String[] huaSe={"黑桃","方片","草花","红桃"};
String[] daXiao={"2","3","4","5","6","7","8","9",
"10","J","Q","K","A"};
但是放在playingCcards 类中的方法sendPokers和compare中,运行就会提示报错(Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1),而且compare中的int size=player.playerOneCards.size();System.out.println("lalal"+size);,size死活就是0。这是怎么回事呢??package com_poker_
import java.util.*;
public class playingCcards {
//player player=new player();=============不放这里了,这没了==============
List&Cards&
cardsList=new ArrayList&Cards&();
List&player& playerList=new ArrayList&player&();
String[] huaSe={"黑桃","方片","草花","红桃"};
String[] daXiao={"2","3","4","5","6","7","8","9",
"10","J","Q","K","A"};
// public void createCards(){
for(int i=0;i&huaSe.i++){
for(int j=0;i&daXiao.j++){
cardsList.add(new Cards(huaSe[i],daXiao[j]));
//cardsSet输出所有扑克牌
System.out.print(huaSe[i]+daXiao[j]+" ");
//建立扑克
public void createCards() {
System.out.println("----------------创建扑克牌----------------");
for(int i = 0;i & huaSe.i++){
for(int j = 0;j & daXiao.j++){
cardsList.add(new Cards(huaSe[i],daXiao[j]));
System.out.print(huaSe[i]+daXiao[j]+" ");
System.out.println("\n"+"-------------扑克牌创建成功!--------------");
* 另外一种输出方法 就不用了
for (Cards card : cardsList) {
System.out.print(card.getType() + card.getNum() + ",");
System.out.println("总共有" + cardsList.size() + "张牌。");
//------------------------------洗牌
Collections.shuffle(cardsList);
System.out.println("--------------洗牌完成--------------");
//建立玩家
public void creatPlayer(){
int playerID=0;
String playerN
Scanner sc=new Scanner(System.in);
for(int k=1;k&=2;k++){
System.out.println("请输入第"+k+"位玩家ID:");
//while(true) 想要在catch后面继续写代码 while(true)才好使
while(true){
sc=new Scanner(System.in);
playerID=sc.nextInt();
}catch(Exception e){
System.out.println("必须为整数");
System.out.println("请输入第"+k+"位玩家姓名:");
playerName=sc.next();
playerList.add(new player(playerID,playerName));
//遍历playerlist查看此时系统中有哪些玩家
for(int p=0;p&playerList.size();p++){
System.out.println("目前存在的玩家有:"+playerList.get(p).id+
"+playerList.get(p).name);
public void sendPokers(){
player player=new player();//===============放这里=================
for(int u=0;u&4;u++){
//哈哈很喜欢这个方法 u==0+(2*n),再多人也不怕!!!!!
if(u==0+(2*n)){
player.playerOneCards.add(cardsList.get(u));
if(u==1+(2*n)){
player.playerSecondCards.add(cardsList.get(u));
//n++的位置很重要的啊!!!!!!!!!!!!!!!!
for(int p=0;p&player.playerCards.size();p++){
System.out.println("目前已经发出的牌有:"+player.playerCards.get(p));
for(Cards pcr1:player.playerOneCards){
System.out.println("玩家"+playerList.get(0).name+"的牌有:"
+pcr1.type+pcr1.num);
for(Cards pcr2:player.playerSecondCards){
System.out.println("玩家"+playerList.get(1).name+"的牌有:"
+pcr2.type+pcr2.num);
//比较两人手牌大小
public void compare(){
player player=new player();//===========在这也new一下=================
List&Cards& everyoneMaxPokeList=new ArrayList&Cards&();
Collections.sort(player.playerOneCards);
Collections.sort(player.playerSecondCards);
//pareTo(per1.playerOneCards,per1.playerSecondCards);
//获取手牌list的size
int size=player.playerOneCards.size();
//System.out.println("lalal"+size);
//获得每个人最大的手牌
System.out.println("玩家"+playerList.get(0).name+"的最大牌:"+player.playerOneCards.get(size-1).type+
player.playerOneCards.get(size-1).num);
System.out.println("玩家"+playerList.get(1).name+"的最大牌:"+player.playerSecondCards.get(size-1).type+
player.playerSecondCards.get(size-1).num);
//把每个人最大手牌放入everyoneMaxPokeList中再做比较
everyoneMaxPokeList.add(player.playerOneCards.get(size-1));
everyoneMaxPokeList.add(player.playerSecondCards.get(size-1));
Collections.sort(everyoneMaxPokeList);
int sze=everyoneMaxPokeList.size();
//看看everyoneMaxPokeList中最大的数据到底属于谁!
//下面这种写法equal方法有问题
if(everyoneMaxPokeList.get(sze-1).equals(player.playerOneCards)){
System.out.println("Winner is:"+playerList.get(0).name);
System.out.println("Winner is:"+playerList.get(1).name);
if(player.playerOneCards.contains(everyoneMaxPokeList.get(sze-1))){
System.out.println("Winner is:"+playerList.get(0).name);
System.out.println("Winner is:"+playerList.get(1).name);
* @param args
public static void main(String[] args) {
// TODO Auto-generated method stub
playingCcards pc=new playingCcards();
pc.createCards();
pc.creatPlayer();
pc.sendPokers();
pc.compare();
}求大神解答
我好折磨死了
写下你的评论...
Copyright (C)
All Rights Reserved | 京ICP备 号-2

参考资料

 

随机推荐