Yes now its working, Thank you !!
Type: Posts; User: dejavu48
Yes now its working, Thank you !!
No I didn't found the String with the null value.
java version "16.0.1" 2021-04-20
Java(TM) SE Runtime Environment (build 16.0.1+9-24)
--- Update ---
When we are running sequentially it...
When I'm running it with one thread it is running smoothly, it is not giving any error. But when I'm running 4 threads, it is giving the above said error.
[b] This is the error I'm getting [\b]
[exception]
Exception in thread "Thread-1" java.lang.NullPointerException: Cannot invoke "String.length()" because "str" is null
at...
[QUOTE] How to add pictures from computer ? So I can add pictures for better understanding ? PS. I am new to Java Programming Forums [/QUOTES]
--- Update ---
The code is running when I'm running single thread but it throwing error when I'm trying to run multiple threads.
--------------------------------------------------...
public class Main extends Thread
{
class credit extends Thread
{
public void run()
{
String filename="Credit_card.txt";