• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 102
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: 13050
67
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 totally ruined the moon. You're gonna hafta pay for that you know. This tiny ad agrees:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic