Mukhang galing kang c++ ah.
1. Tanggalin mo yung space before ng parenthesis when calling a function/method.
Example: This same goes sa scanner mo.
Instead of: new_pract = new new_pract ()
Do: new_pract = new new_pract()
2. You can name your scanner with in instead of cin. Tho, ikaw naman bahala pero ito yung lagi kong ginagawa since mabilis.
3. Naming variables and classes: Sa variable at function, gumamit ka ng camel case: newPract = new newPract() and sa classes naman, gumamit ka ng Pascal case: Practice, ThisIsMyClass
4. You can use System.out.print sa mga kasunod is input para walang new line
5. Maeencounter mo yung error sa magkasunod na input na nextInt at nextLine and hindi mababasa yung isa. Yung solution is lagyan mo muna ng nextLine() after ng nextInt().
int num = in.nextInt();
in.nextLine();
String text = in.next();