Home > Back-end >  Java null pointer exception
Java null pointer exception

Time:10-28

Written in recursive traversal of the document, a null pointer exception, I looked at it as if it's not a problem, a similar situation last time (last time I create a class object, the initialize the members of the class variables are also called the this error, use the constructor and set methods are not, then I direct assignment in the class, is no exception), I remember the Java can call another method in the same class, don't know where bugs appear, seek solutions,

The Exception in the thread "main" Java. Lang. NullPointerException
The at code_10_21. CheckFiles. Check (test_10. Java: 22)
The at code_10_21. CheckFiles. Check (test_10. Java: 25)
The at code_10_21. CheckFiles. Check (test_10. Java: 25)
The at code_10_21. CheckFiles. Set (test_10. Java: 17)
The at code_10_21. Test_10. Main (test_10. Java: 47)

CodePudding user response:

If judgment for the if (ff. IsDirectory () & amp; & Ff. ListFiles ()!=null) {

CodePudding user response:

Found the reason, as if the JVM authority is not enough, although some files array has been shown, but in fact take less than value of traversal

CodePudding user response:

The JVM permissions is what meaning, universal
  • Related