0

I just started learning Java as I'm being taught in school. I saw many people tell that IntelliJ is a great IDE for java, so to just try it I moved from BlueJ to IntelliJ.

One big problem I am facing is that in blueJ if I have to pass values to the program when it is running, BlueJ actually asks input before showing the output, and in the place of the String [] args I enter the values inside {} separated by commas.

But in IntelliJ it never asks for the values and directly shows an error that the index of the array specified doesn't exist.

Please help me how to solve this problem and be able to pass the values to the program...

16
  • To provide input you could use classes like Scanner or Console (ask for input) or pass the data as command line arguments (part of the startup command). It would help if you'd share some code to understand what problem you're facing. Commented Dec 1, 2021 at 8:51
  • @PradeepSimha, thank you for suggesting but that is from eclipse and not from BlueJ, I hope you yourself read that one before suggesting! Commented Dec 1, 2021 at 8:52
  • Why do you people suggest eclipse when I'm asking when compared to blueJ? ? Commented Dec 1, 2021 at 8:53
  • 1
    In short, what you did in BlueJ should work fine in IntelliJ (or Eclipse, or NetBeans, or any other IDE). If that's not the case for you, please edit your question to provide a minimal reproducible example. Commented Dec 1, 2021 at 8:59
  • 1
    You should not feel stupid. Downvotes are not a judgment on the person asking the question. But if your feelings are hurt by downvotes, complaining about it is not going to help. Commented Dec 1, 2021 at 9:04

0