• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Help me solve few errors

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey guys, I'm learning java from a book called Head First Java. I'm getting errors while compiling my first program. I have jre,jdk 7 on win 7 and open jdk and jre on ubuntu distro, which one should I prefer and why?
here look at those errors
" Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Mohammed Ayaz S>cd c:\java\src

c:\java\src>javac MyFirstApp.java
MyFirstApp.java:3: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
{ System.out.printIn("I Rule!");
^
MyFirstApp.java:4: cannot find symbol
symbol : method printIn(java.lang.String)
location: class java.io.PrintStream
System.out.printIn("The World");
^
2 errors

c:\java\src> "

please help me out!


 
Ranch Hand
Posts: 98
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Little tip, stack trace is good, but stack trace and source code is better. However I think in this instance I think you should carefully re-read the book material, especially around the System.out part - hint: it is not a capital 'I'


S

Edit: Aww, missed that.
Welcome anyway
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And Welcome to the Ranch.
 
Ranch Hand
Posts: 49
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mohammad Ayaz Shaikh wrote:hey guys, I'm learning java from a book called Head First Java. I'm getting errors while compiling my first program. I have jre,jdk 7 on win 7 and
location: class java.io.PrintStream
{ System.out.printIn("I Rule!");
^



Refer java api for methods present in PrintSream class there is typo error in your code.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

bala nannaka wrote:Refer java api for methods present in PrintSream class there is typo error in your code.


Well spotted bala. I have to admit, it took my old eyes a lot longer than yours.

Winston
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Well spotted bala. I have to admit, it took my old eyes a lot longer than yours


Yes a good spot but to be fair to Stuie he spotted it first - and I had intended to congratulate him after his post but got side tracked.
 
lowercase baba
Posts: 13003
66
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mohammad Ayaz Shaikh,
Your post was moved to a new topic.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic