CodesJava

Easy learning with example program codes

how to get current thread in java?

The currentThread() method of Thread class is used to get current thread in java. It is a static method. Syntax of currentThread() method: public static Thread currentThread()… Read More
Posted in Java   

can we override run method in thread?

run() method public void run() : It run method is used to perform operations by thread. Yes, we can override run method in thread but start method… Read More
Posted in Java   

can we override start method in thread?

start() method public void start() It starts thread to begin execution, JVM calls run method of this thread. IllegalThreadStateException – if the thread was already started. We… Read More
Posted in Java   

Why we call start method in thread

In java multithreading, it is a important point to understand that why we call start method instead of calling run method directly. start method: It starts thread… Read More
Posted in Java   

difference between thread start and run method

Let’s discuss the differences between start and run methods in details. Difference between start and run method in java:                        start method                          run method It starts thread to… Read More
Posted in Java   

Java networking tutorial

Java network programming provides the facility of connecting two or more computing devices together. The devices communicate with each other using either the Transmission Control Protocol (TCP)… Read More
Posted in Java   

how to get system hostname in java?

The java.net.InetAddress class represents an IP address. It provides the methods to work with IP and host name. Get system hostname in java package com.codesjava;   import… Read More
Posted in Java   


Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap