0

How to use import java.lang

My code.. import java.util.Scanner; import java.lang.*; //import java.io.*;I public class BankTransaction { public static void main (String args[]) ) { //TODO code application logic here Scanner var=new(System.in); int pin; double initial, amount, sum, difference; initial = 5000.00; System.out.println ("Enter your pin:"); pin=var. nextInt (); { Doesn't seem to work and always turn into like this.. java.lang.ClassNotFoundException: Didn't find class "null.BankTransaction" on path: DexPathList[[dex file "/storage/emulated/0/JavaNIDE/PrestonBank/app/build/dexedClasses/classes.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)... ...every time i run it

15th Oct 2019, 12:35 PM
Lorraine Jasten
Lorraine Jasten - avatar
3 odpowiedzi
+ 2
you dont need to import java.lang its there by default
15th Oct 2019, 12:39 PM
Taste
Taste - avatar
+ 2
because its the java core. System, String, data type wrapper, Thread, Exception, Error. almost everything is in there,
15th Oct 2019, 12:47 PM
Taste
Taste - avatar
0
Thanks, but how did it become default?
15th Oct 2019, 12:42 PM
Lorraine Jasten
Lorraine Jasten - avatar