Why, when I paste the code in NetBeans does it give an error?