You define and write a java class name as: MyProg, and need to save it to disk.
ID: 3583319 • Letter: Y
Question
You define and write a java class name as: MyProg, and need to save it to disk. what is the file name should you assign to this java class program? To compile the java class, you just saved under DOS, write down the command line to compile the program. The java compiler displayed an error message as: 'Javas' is not recognized as an Internal or external command. Briefly describe what does it mean? The java complier displayed an error message as: 'Javas' is not recognized as an Internal or external command.? Briefly describe how to fix it? The java compiler compiled a java class without syntax error, the O/P file created by the compiler is called what? To execute your java class which compiled successfully, what is the interpreter name that translates the class file of machine code? You want to execute your class program under DOS, what command line you should issue to run the program? You write java program and have it compiled, what type of error (s) if there is any that java compiler reports to you? You write a java program and have it compiled, what type of logic error (s) that the java compiler will report to you? ANS: Check one: [] report common logic error We have emphasized the source should be properly indented, why do we need this? AND: Check one: [] make source looking good [] make byte code run faster You write the class MyProg use IDE NetBeans, to change the name of the class what tool in the tool bar you should use (click) ? To compile and run the current class under NetBeans, what tool in the tool bar you should use? To keep and save your source file under NetBeans, what tool in the tool bar you should use to save all your work?Explanation / Answer
1) Myprog.java
2)javac Myprog.java
3) It means that the java compiler is either not installed or the call path is not set.
4) If jdk is installed then either run the program from bin folder of jdk or set the class path in environment variables.
5) After successfull compilation of the program it creates .class file for all classes in the file so in this case it will be MyProg.class
6) The interpreter name is java so to run the program write java Myprog
7) java Myprog
8) All syntax errors and some of the semantic errors (the static semantic errors) are detected by the compiler.
9) Java ignoring any logic errors(logical errors cannot be detected by the compiler)
10) Make it easy to read and Maintain
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.