{"id":4263,"date":"2014-03-30T09:33:56","date_gmt":"2014-03-30T09:33:56","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/java-beginner-program-not-compiling-getting-error-message-collection-of-common-programming-errors\/"},"modified":"2014-03-30T09:33:56","modified_gmt":"2014-03-30T09:33:56","slug":"java-beginner-program-not-compiling-getting-error-message-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/java-beginner-program-not-compiling-getting-error-message-collection-of-common-programming-errors\/","title":{"rendered":"Java Beginner: Program not compiling; getting error message-Collection of common programming errors"},"content":{"rendered":"<p>I am just beginning to learn and use java. I tried creating a simple ticket program:<\/p>\n<pre><code>import java.util.Scanner;\n\npublic class First {\n\npublic static void main(String[] args) {\n    String name;\n    int v_tickets, g_tickets;\n    double vip=1000.00, gen=500.00, total;\n    Scanner in=new Scanner(System.in);\n    System.out.printf(\"Enter your name\");\n    name = in.next();\n    System.out.printf(\"How many VIP tickets do you want?\");\n    v_tickets = in.nextInt();\n    System.out.printf(\"How many general Tickets do you want?\");\n    g_tickets = in.nextInt();\n    total = (v_tickets*vip)+(g_tickets*gen);\n    System.out.printf(\"Receipt\\n Name: %d\\n %d VIP %6f\\n %d General %6f\\n Total %6f\",name,v_tickets,v_tickets*vip,g_tickets,g_tickets*gen,total);\n\n} \/\/end main\n\n\n} \/\/end program\n<\/code><\/pre>\n<p>But I keep getting this error message:<\/p>\n<pre><code>--------------------Configuration: --------------------\nUsage: java [-options] class [args...]\n       (to execute a class)\n   or  java [-options] -jar jarfile [args...]\n       (to execute a jar file)\nwhere options include:\n-d32      use a 32-bit data model if available\n-d64      use a 64-bit data model if available\n-server   to select the \"server\" VM\n-hotspot      is a synonym for the \"server\" VM  [deprecated]\n              The default VM is server.\n\n-cp \n-classpath \n              A ; separated list of directories, JAR archives,\n              and ZIP archives to search for class files.\n-D=\n              set a system property\n-verbose:[class|gc|jni]\n              enable verbose output\n-version      print product version and exit\n-version:\n              require the specified version to run\n-showversion  print product version and continue\n-jre-restrict-search | -no-jre-restrict-search\n              include\/exclude user private JREs in the version search\n-? -help      print this help message\n-X            print help on non-standard options\n-ea[:...|:]\n-enableassertions[:...|:]\n              enable assertions with specified granularity\n-da[:...|:]\n-disableassertions[:...|:]\n              disable assertions with specified granularity\n-esa | -enablesystemassertions\n              enable system assertions\n-dsa | -disablesystemassertions\n              disable system assertions\n-agentlib:[=]\n              load native agent library , e.g. -agentlib:hprof\n              see also, -agentlib:jdwp=help and -agentlib:hprof=help\n-agentpath:[=]\n              load native agent library by full pathname\n-javaagent:[=]\n              load Java programming language agent, see java.lang.instrument\n-splash:\n              show splash screen with specified image\nSee http:\/\/www.oracle.com\/technetwork\/java\/javase\/documentation\/index.html for more details.\n\nProcess completed.\n<\/code><\/pre>\n<p>I am using JCreator and under &#8216;Build Output&#8217; it says &#8216;Process Completed&#8217; and it&#8217;s not showing me any errors. But the error above is what I&#8217;m getting under &#8216;General Output&#8217;. Any help would be appreciated with this and remember, I am very new at this.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am just beginning to learn and use java. I tried creating a simple ticket program: import java.util.Scanner; public class First { public static void main(String[] args) { String name; int v_tickets, g_tickets; double vip=1000.00, gen=500.00, total; Scanner in=new Scanner(System.in); System.out.printf(&#8220;Enter your name&#8221;); name = in.next(); System.out.printf(&#8220;How many VIP tickets do you want?&#8221;); v_tickets = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4263","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4263"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4263\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4263"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}