My textbook showed this piece of C++ code to run however when I run it on net beans it displays this error Exception in thread "main" ArrayIndexOutOfBoundsException: 0
#include <iostream>
using namespace std;
int main(void)
{ 
  cout << "Hello world";
  return 0; 
}
 
                        
there is no java.lang.ArrayIndexOutOfBoundsException in c++
that error is because netbeans is running another java project instead.
rightclick on the c++ project and click on "close others..." then you can work on the right one.