我正在使用以下代码:-
public static void main(String[] args) {
int threadPool = 4;
System.out.println("initial count---" + Thread.activeCount());
Thread.currentThread();
}
Run Code Online (Sandbox Code Playgroud)
在 IntelliJ 上调试时输出不同:-
initial count---1
在 IntelliJ 上运行时:-
initial count---2
当我运行这个程序时,我无法理解什么是额外的线程。
我有以下 html:
<span tabindex="19">
</span>
<span tabindex="20">
</span>
<span tabindex="21">
</span>
<span id="hidden" tabindex="22">
</span>
<span tabindex="23">
</span>
<span tabindex="24">
</span>
Run Code Online (Sandbox Code Playgroud)
如您所见,其中一个跨度被隐藏,隐藏它的代码是
#hidden
{
display: none;
}
Run Code Online (Sandbox Code Playgroud)
我想要一个选项卡跳过隐藏索引的行为。所以当我点击标签时我想要这样的东西:-转到 19,20,21,23,24
我无法控制标签索引,因为它们是在 html i 进程中硬编码的。
public class Parent {
public void printParent()
{
System.out.println("I am the Parent");
System.out.println("----this is ::---" + this);
this.printChild();
}
private void printChild()
{
System.out.println("This is my child");
}
}
public class Child extends Parent {
private void printChild()
{
System.out.println("I am the child");
}
}
public class RelationshipTester {
@Test
public void testRelation()
{
Child parent = new Child();
parent.printParent();
}
}
Run Code Online (Sandbox Code Playgroud)
这是输出: -
我是家长
----这是:: --- datastructures.lists.inheritance.Child@1a692dec
这是我的孩子
该对象属于Child类型,但它不调用子方法和父方法.我给了this.printChild();