高手请帮我分析下这个范型的问题List<Integer> ls=new ArrayList()
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了高手请帮我分析下这个范型的问题List<Integer> ls=new ArrayList()相关的知识,希望对你有一定的参考价值。
ArrayList arr=new ArrayList();
arr.add("aa");
List<Integer>ls=arr;
System.out.println(ls);//输出结果是[aa],那<Integer>并没用任何限制.这是为什么
arr.add("aa");
List<Integer>ls=arr;
System.out.println(ls);
这样就可以了,连编译都不会通过
你这里是先把"aa"添加到了没有泛型的ArrayList中,又将aar向上转型,所以不会有限制 参考技术A 同意 Ro_ths_Child 的意见
如果编译通过的话
说明aa这个并不是代表的是字符串的“aa”
现在表示的是16进制的数
你把"aa"换成其它的字符呢 比如 "lightning_16" 看看能不能编译通过,可以的话再看看结果是什么 参考技术B 如果编译通过的话
说明aa这个并不是代表的是字符串的“aa”
现在表示的是16进制的数
请高手帮我分析下Minidump文件,如果真确定有重酬
具体内容在下面1楼
全文是如下:(这个不是答案而是用户提问的内容,请高手显身)Microsoft (R) Windows Debugger Version 6.7.0005.1
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [%SystemRoot%\Minidump\Mini061409-01.dmp]
Mini Kernel Dump File: Only registers and stack trace are available
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path. *
* Use .symfix to have the debugger choose a symbol path. *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
Unable to load image ntoskrnl.exe, Win32 error 0n2
*** WARNING: Unable to verify timestamp for ntoskrnl.exe
*** ERROR: Module load completed but symbols could not be loaded for ntoskrnl.exe
Windows XP Kernel Version 2600 (Service Pack 3.3300) MP (2 procs) Free x86 compatible
Product: WinNt, suite: TerminalServer SingleUserTS
Kernel base = 0x804d8000 PsLoadedModuleList = 0x8055e720
Debug session time: Sun Jun 14 01:59:47.156 2009 (GMT+8)
System Uptime: 0 days 11:50:22.961
*********************************************************************
* Symbols can not be loaded because symbol path is not initialized. *
* *
* The Symbol Path can be set by: *
* using the _NT_SYMBOL_PATH environment variable. *
* using the -y <symbol_path> argument when starting the debugger. *
* using .sympath and .sympath+ *
*********************************************************************
Unable to load image ntoskrnl.exe, Win32 error 0n2
*** WARNING: Unable to verify timestamp for ntoskrnl.exe
*** ERROR: Module load completed but symbols could not be loaded for ntoskrnl.exe
Loading Kernel Symbols
.................................................................................
Loading User Symbols
Loading unloaded module list
...............................
*******************************************************************************
* *
* Bugcheck Analysis *
* *
*******************************************************************************
Use !analyze -v to get detailed debugging information.
BugCheck 1000008E, c0000005, 8052f787, b690bc80, 0
***** Kernel symbols are WRONG. Please fix symbols to do analysis.
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: nt!_KPRCB ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: nt!KPRCB ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: nt!_KPRCB ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: nt!KPRCB ***
*** ***
*************************************************************************
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: nt!_KPRCB ***
*** ***
*************************************************************************
Probably caused by : ntoskrnl.exe ( nt+57787 )
Followup: MachineOwner
--------- 参考技术A 楼主,重新安装系统吧,windows系统内核错误,无法解决 参考技术B 高手显身:如此这般,这般如此,哇哈哈,呀呼嘿
以上是关于高手请帮我分析下这个范型的问题List<Integer> ls=new ArrayList()的主要内容,如果未能解决你的问题,请参考以下文章
哪位高手能否告诉我下面个用C写的斐波那契数列哪里出问题了,算出的数据出现了负数,请帮我找下问题所在