Question:

I have an application, but to test something, I need to change value of a String[].

But when I do it using change value in variables tab, everytime it gives error.

I have tried using :

{"string1", "string2"}

["string1", "string2"]

[string1, string2]

etc. But had no luck. Can anybody plese tell how to do this?

Answer:

See, you can't actually add(change) value in array while debugging.

But there is a work around, you need to assign new string array to this reference like,

new String[]{"string1", "string2"}

But this will remove old entries, so if you want to only add new values best way is to, copy old values from the variables tab.

new String[]{old values..., "string1", "string2"}

原文地址:http://stackoverflow.com/questions/23270464/change-value-of-string-array-at-debug-eclipse

Change value of string array at debug eclipse--转的更多相关文章

  1. [V5] ARM: dts: Change i2s compatible string on exynos5250【转】

    本文转载自:https://patchwork.kernel.org/patch/2845464/ Padmavathi VennaAug. 16, 2013, 4:26 a.m. UTC This ...

  2. c++ hex string array 转换 串口常用

    c++ hex string array 转换 效果如下 tset string is follow 0x50 55 0x35 00 10 203040506073031323334ff format ...

  3. JavaScript string array 数组

    Array类可以如下定义: var aValues = new Array(); 如果预先知道数组的长度,可以用参数传递长度 var aValues = new Array(20); -------- ...

  4. js基础小总结之string&array&object

    一.数据类型之间的转换 string--->number :parseInt(string)/parseFloat(string); 注:在Date中,因为返回值date为单位为ms的字符串,将 ...

  5. js常用API 数据类型 基本类型,基本包装类型,引用类型 Object String Array Boolean Number Date Math

    数据类型 变量.作用域及内存 基础类型(primitive value):Undefined.Null.Boolean.Number和String.这些类型在内存中分别占用固定大小的空间,他们的值保存 ...

  6. C#"曾经的字符串数组"string[] array=new string[]{"**","****"};

    写博客是一件很伟大的事情,尤其是也牛逼的博客,因为它能帮助需要的人,更能使自己对知识有一个更为深刻的理解! 欢迎关注我的博客! 字符串操作(取当前时间) string time=convert.tos ...

  7. JavaScript学习 - 基础(五) - string/array/function/windows对象

    String对象 更详细转:http://www.w3school.com.cn/jsref/jsref_obj_string.asp //------------------------------ ...

  8. Java SE 基础知识(String,Array)

    String 类: 1. 对于String对象的相等性判断来说,请使用equals()方法,而不是==.String的equals()是判断当前字符串与传进来的字符串的内容是否一致. 2. Strin ...

  9. js基础篇string&&array(应YX同学面试复习要求 - -)

    js中的数据类型一共有五个基本数据类型,分别是undefined,null,boolean,number,string. js中的Object类型中包括两大类型:Function类型和array类型. ...

随机推荐

  1. cocos creater 简单的跳跃动作。

    因为最近一段时间有打算做一个2D游戏的想法,就顺便学习了一下cocos,很惊异的它的脚本编写语言竟然支持js,正好以前对js有一定的了解,就临时拿起来了. 这是来自官方的一个实例,不过在参考过程中,发 ...

  2. gcc链接g++编译生成的静态库和动态库的makefile示例

    使用c++开发程序或者库时,将库提供给其他人使用. 然而使用者是使用c开发的程序,链接g++编译生成的库时,于链接gcc生成的库,有所不同. 首先是静态库,以链接g++编译生成的libmylib.a为 ...

  3. 转:LESS CSS 框架简介

    原文来自于:http://www.ibm.com/developerworks/cn/web/1207_zhaoch_lesscss/ 简介 CSS(层叠样式表)是一门历史悠久的标记性语言,同 HTM ...

  4. ubuntu 设置root启动

    http://www.linuxidc.com/Linux/2012-05/60806.htm sudo -s 输入普通用户的password 回车即可进入root权限 vi /etc/lightdm ...

  5. net programming guid

    Beej's Guide to Network Programming Using Internet Sockets Brian "Beej Jorgensen" Hallbeej ...

  6. Apache Maven 入门篇(下)

    第一篇文章大概的介绍了一下Apache Maven以及它的下载和安装,并且运行了一个简单的示例.那么在对maven有了一点接触后,接下去的一步是要了解maven的核心概念,这样才能在使用maven的时 ...

  7. Node.js快速入门

    Node.js是什么? Node.js是建立在谷歌Chrome的JavaScript引擎(V8引擎)的Web应用程序框架. 它的最新版本是:v0.12.7(在编写本教程时的版本).Node.js在官方 ...

  8. [HDOJ 5155] Harry And Magic Box

    题目链接:HDOJ - 5155 题目大意 有一个 n * m 的棋盘,已知每行每列都至少有一个棋子,求可能有多少种不同的棋子分布情况.答案对一个大素数取模. 题目分析 算法1: 使用容斥原理与递推. ...

  9. 利用CSP探测网站登陆状态

    0x00 背景 今天看到zone里有同学发帖说了探测支付宝登录状态的帖子:http://zone.wooyun.org/content/17665 由此我想到了我们parsec的@/fd 半年前提到的 ...

  10. codeforces Toy Sum

    题意:给你x个集合的数,然后根据求y集合的数. 思路:根据对称性,先找出对称出现的个数cnt,然后对称位置的中如果出现一个的把另一个加入到y集合中,再找出cnt个对应位置都不出现的加入到y集合中. # ...