<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>小白教程 - Java</title>
    <link>https://www.xiaobai27.com/forum-37-1.html</link>
    <description>Latest 20 threads of Java</description>
    <copyright>Copyright(C) 小白教程</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Mon, 11 May 2026 13:04:29 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://www.xiaobai27.com/static/image/common/logo_88_31.gif</url>
      <title>小白教程</title>
      <link>https://www.xiaobai27.com/</link>
    </image>
    <item>
      <title>请问一个父类实现子类接口的情况</title>
      <link>https://www.xiaobai27.com/thread-345-1-1.html</link>
      <description><![CDATA[请教各位java大神，如果父类Parent有一个方法public void a(){}，有一个子类Child继承父类Parent，同时实现接口IChild，IChild内定义了一个方法void a()，按道理来说，Child并没有实现接口中的方法，但是由于碰巧从父类继承了一个名字一样的方法，所以编译并没有报错， ...]]></description>
      <category>Java</category>
      <author>梦蝶幽谷</author>
      <pubDate>Mon, 31 May 2021 04:20:25 +0000</pubDate>
    </item>
    <item>
      <title>为什么输入不合法，程序还是继续执行下面的代码？</title>
      <link>https://www.xiaobai27.com/thread-350-1-1.html</link>
      <description><![CDATA[请教各位大神，为什么在setter里设置了年龄必须在0-100之间，但是即使输入了错误的数字，程序还是一直执行到底？]]></description>
      <category>Java</category>
      <author>弯弯月郎</author>
      <pubDate>Fri, 21 May 2021 09:05:25 +0000</pubDate>
    </item>
    <item>
      <title>Java无符号移位运算符以及数据类型转换的问题</title>
      <link>https://www.xiaobai27.com/thread-346-1-1.html</link>
      <description><![CDATA[不懂就问，我是熟悉C语言，最近接触Java，关于无符号移位运算符&gt;&gt;&gt;，如下图所示，不明白在移位和强制数据类型转换的时候出了什么问题？什么原理？应该如何修改、避免这种问题呢？请各位大神指教。

百思不得其解，所以最后不得不补充处理：short iii = (short) ((crc &gt;&gt; ...]]></description>
      <category>Java</category>
      <author>薅</author>
      <pubDate>Mon, 17 May 2021 02:28:21 +0000</pubDate>
    </item>
    <item>
      <title>关于父类和子类转换的问题</title>
      <link>https://www.xiaobai27.com/thread-347-1-1.html</link>
      <description><![CDATA[我现在有A1,A2,A3,A4四个类继承了A，然后我接参数会接收到A1~A4中任意一个类，所以我用A类接收了(此时参数是用请求的方式接收)，然后我要对数据做处理，可能需要用到A1里面的属性，如果我直接用A点，是点不出来，就只能转换类型，强转又会报类造型异常，我现在能怎么做 ...]]></description>
      <category>Java</category>
      <author>福乐乐</author>
      <pubDate>Sun, 16 May 2021 09:24:06 +0000</pubDate>
    </item>
    <item>
      <title>非常简单的一个问题，Java中怎么用不了var</title>
      <link>https://www.xiaobai27.com/thread-352-1-1.html</link>
      <description><![CDATA[看core Java 的时候说从Java10开始可以用var定义局部变量，原文如下：

Starting with Java 10, you do not need to declare the types of local variables if they can be inferred from the initial value. Simply use the keyword varinstead of the type:
var vacat ...]]></description>
      <category>Java</category>
      <author>寻常路</author>
      <pubDate>Wed, 12 May 2021 00:16:27 +0000</pubDate>
    </item>
    <item>
      <title>为啥异常报错信息乱码了？</title>
      <link>https://www.xiaobai27.com/thread-353-1-1.html</link>
      <description><![CDATA[大佬啊，百思不得其解啊]]></description>
      <category>Java</category>
      <author>玛</author>
      <pubDate>Tue, 11 May 2021 16:33:19 +0000</pubDate>
    </item>
    <item>
      <title>abstract与static可以连用修饰方法吗</title>
      <link>https://www.xiaobai27.com/thread-343-1-1.html</link>
      <description><![CDATA[abstract：用来声明抽象方法，抽象方法没有方法体，不能被直接调用，必须在子类overriding后才能使用。 
static：用来声明静态方法，静态方法可以被类及其对象调用。
用static声明方法表明这个方法在不生成类的实例时可直接被类调用，而abstract方法不能被调用，两者矛 ...]]></description>
      <category>Java</category>
      <author>长五征程</author>
      <pubDate>Fri, 07 May 2021 02:04:08 +0000</pubDate>
    </item>
    <item>
      <title>RestControllerAdvice 不生效问题</title>
      <link>https://www.xiaobai27.com/thread-351-1-1.html</link>
      <description><![CDATA[使用RestControllerAdvice做全局的异常控制，返回我自定义的一个对象。
使用debug模式步进，出现错误的时候能够正常的进入RestControllerAdvice注解下的类中对应ExceptionHandler注解的方法，也返回了我自定义的对象，但是在最后的返回结果中，并不是我自定义的这个对象 ...]]></description>
      <category>Java</category>
      <author>苏州丰潮贸易有限公司</author>
      <pubDate>Wed, 05 May 2021 00:38:04 +0000</pubDate>
    </item>
    <item>
      <title>synchronized方法里面嵌套synchronized代码块，这样是不是可以...</title>
      <link>https://www.xiaobai27.com/thread-344-1-1.html</link>
      <description><![CDATA[synchronized方法里面嵌套synchronized代码块，这样是不是可以上两个锁？
非静态synchronized 方法的锁是本类对象this，synchronized 代码块中再创建一个对象充当锁，这样可以是不是实现两个锁了？]]></description>
      <category>Java</category>
      <author>孙大眼</author>
      <pubDate>Tue, 04 May 2021 02:27:01 +0000</pubDate>
    </item>
    <item>
      <title>如何统计一段Java业务代码的CPU执行时间和IO执行时间</title>
      <link>https://www.xiaobai27.com/thread-355-1-1.html</link>
      <description><![CDATA[问题：
业务代码中，总的时间消耗包含CPU时间 和 IO 时间。
如何通过代码或者其他工具，统计任意一段业务代码的CPU时间和IO时间。

例如针对上面图中的business方法，可以获得CPU累计消耗时间109ms和剩余的IO累计时间消耗。
假设业务方法是不透明的，只能调用，那么调 ...]]></description>
      <category>Java</category>
      <author>刘俊平</author>
      <pubDate>Wed, 28 Apr 2021 12:06:16 +0000</pubDate>
    </item>
    <item>
      <title>java求和数值的返回</title>
      <link>https://www.xiaobai27.com/thread-354-1-1.html</link>
      <description><![CDATA[java如何把数据库所计算的求和数值返回呢，可不可以返回值不是ResultSet类型的，如果行的话要怎么写呀，求解。]]></description>
      <category>Java</category>
      <author>默默默默默默默默默默</author>
      <pubDate>Wed, 28 Apr 2021 02:40:16 +0000</pubDate>
    </item>
    <item>
      <title>为啥异常报错信息乱码了？</title>
      <link>https://www.xiaobai27.com/thread-356-1-1.html</link>
      <description><![CDATA[大佬啊，百思不得其解啊]]></description>
      <category>Java</category>
      <author>柯兰</author>
      <pubDate>Sun, 25 Apr 2021 23:49:34 +0000</pubDate>
    </item>
    <item>
      <title>小白问题小请教一下大佬们了，望大佬赐教</title>
      <link>https://www.xiaobai27.com/thread-357-1-1.html</link>
      <description><![CDATA[最近刚刚学到Java的try catch finally throw 和 throws 异常处理部分。
稍微有点会用了,
之前学的什么if  for  while 之类的都有明确指定是做什么用的，
但这个异常捕获和处理一般是什么情况下用？

0.0望大佬赐教， - -通俗点说，深奥了咱也听不懂 
 ...]]></description>
      <category>Java</category>
      <author>功不唐捐</author>
      <pubDate>Sun, 18 Apr 2021 10:28:22 +0000</pubDate>
    </item>
    <item>
      <title>字符串比较大小问题</title>
      <link>https://www.xiaobai27.com/thread-358-1-1.html</link>
      <description><![CDATA[字符串1.0.1.8这种类型怎么比较大小
eg: 1.0.1.8期望小于1.0.1.10]]></description>
      <category>Java</category>
      <author>山里蛙</author>
      <pubDate>Sat, 10 Apr 2021 07:26:22 +0000</pubDate>
    </item>
    <item>
      <title>java成员变量线程安全问题的疑问</title>
      <link>https://www.xiaobai27.com/thread-360-1-1.html</link>
      <description><![CDATA[为什么这段代码会有线程安全问题呢
这里为什么会有线程安全问题啊，按着这样的调用，无论那个线程remove（）的时候，集合里面都会有一个元素，因为是先加后remove 怎么可能发生执行到remove的时候，集合没元素，就算一个线程没加上，另外一个线程也加上了啊
 ...]]></description>
      <category>Java</category>
      <author>万敏</author>
      <pubDate>Wed, 07 Apr 2021 09:41:23 +0000</pubDate>
    </item>
    <item>
      <title>java下标越界如何解决</title>
      <link>https://www.xiaobai27.com/thread-361-1-1.html</link>
      <description><![CDATA[报错Exception in thread \&quot;main\&quot; java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
报错行一直显示是“map.put(arr[0],arr[1])”这一行
如果在此行之前加上“System.out.println(arr[1]);”，报错的就是这行
把“map.put(arr[0],arr[1]) ...]]></description>
      <category>Java</category>
      <author>建設</author>
      <pubDate>Fri, 02 Apr 2021 03:32:23 +0000</pubDate>
    </item>
    <item>
      <title>yml文件的配置无法起作用</title>
      <link>https://www.xiaobai27.com/thread-362-1-1.html</link>
      <description><![CDATA[初入springboot想做个项目练手，yml居然不生效。根据网上的方法看了很久没看出来。望各位大哥帮忙看看哪出问题了]]></description>
      <category>Java</category>
      <author>只在浦西混</author>
      <pubDate>Tue, 30 Mar 2021 12:15:28 +0000</pubDate>
    </item>
    <item>
      <title>请教，这两个代码，哪个更合理？</title>
      <link>https://www.xiaobai27.com/thread-364-1-1.html</link>
      <description><![CDATA[这两个代码，哪个更合理？哪个更容易维护？
如果要保证每个方法不超过20行，造汽车1比较好。但是方法太多，调来调去，跳来跳去，好像也不易阅读。
造汽车2一个方法的代码可能上百行，但只要一个方法。虽然感觉压力很大，但是想象成读文章，好像也合理。而且可以用注释把 ...]]></description>
      <category>Java</category>
      <author>極趚蝸牜</author>
      <pubDate>Mon, 22 Mar 2021 02:18:08 +0000</pubDate>
    </item>
    <item>
      <title>能用java写游戏脚本吗</title>
      <link>https://www.xiaobai27.com/thread-359-1-1.html</link>
      <description><![CDATA[刚刚接触求大神]]></description>
      <category>Java</category>
      <author>人生在于尝试</author>
      <pubDate>Tue, 16 Mar 2021 01:29:20 +0000</pubDate>
    </item>
    <item>
      <title>main方法的作用</title>
      <link>https://www.xiaobai27.com/thread-363-1-1.html</link>
      <description><![CDATA[java中的代码都是在main方法中执行的吗？main方法执行结束是不是就代表程序结束了？]]></description>
      <category>Java</category>
      <author>欠巴登</author>
      <pubDate>Thu, 11 Mar 2021 06:18:33 +0000</pubDate>
    </item>
  </channel>
</rss>