Skip to content
← Back to Community
Automatic import
Profile icon
Videc

Why doesnt repl automaticly import for instance class Scanner when you try to use it...In othher JDK you can do it easly

Voters
Profile icon
dogm646
Profile icon
JOHNSCHULTZ1
Profile icon
NikhilSultania
Profile icon
Videc
Comments
hotnewtop
Profile icon
John_WardWard

@Videoc I don't think this would be a good idea, seeing as certain packages have similar names, also, it would ruin syntax of certain languages.

Profile icon
mat1

I'm not sure what you mean. Can you please link your repl?

Please upvote this comment if it was helpful or useful in any way

Profile icon
John_WardWard

@mat1 He's trying to say as in if you were to import random for example:

import random t=random.randint(1,100) print t

But then instead you would be able to write that code without import shown below.

t=random.randint(1,100) print t

However, this goes against the syntax of python(and other languages), so therefore it would not work.