• Post Reply Bookmark Topic Watch Topic
  • New Topic

Error trying to call a method  RSS feed

 
Roger Henthorn
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So... I know this should work---however for the life of me I cant seem to access the class method to get my program working---keeps saying cannot find symbol " RogerHenthornChapter12.java:7: error: cannot find symbol
Chapter12Driver Encrypt = new Encrypt();"



Here is the file that I am trying to reference the encrypt variable from



any help would be most appreciated!

 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"new" is for instantiating objects, not for invoking methods. The class of which the method "Encrypt" is a member has a different name.

By the way, you should get into the habit of naming things like everyone in the Java world does - classes start with uppercase letters, methods and fields with lowercase letters. That way everyone will understand what's what in your code right away.
 
Roger Henthorn
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've updated my code--and now it works:





Sorry for the temporary brain fart in coding---its been a long weekend, and staring at code without taking breaks tends to make me glaze over the obvious.

went and made a White Russian---allowed me enough time to get a fresh set of eyes on the code. The Dude Abides........


Thanks!


 
Roger Henthorn
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um.... unsure what the heck the urls are in my code that I pasted from my textpad?!?! They are most certainly not in my finished code...

only changes I made were:

Chapter12Driver Encrypt = new Chapter12Driver();

and the calling methods:

Encrypt.encrypt




 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um.... unsure what the heck the urls are in my code that I pasted from my textpad?

That's a known bug in the forum software, don't worry about it. I fixed your post
 
Roger Henthorn
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!