Jump to content

FatCow

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About FatCow

  • Rank
    Lepton

Profile Information

  • Favorite Area of Science
    Computer Science
  1. I have been given a simple ChatBot program for my Computer Science class, but I do not understand most of the codes and methods included in it Some of the things I do not understand in the program are "psn >= 0", "lastChar", and "substring". If anyone of you guys can spare some of your time to explain these to me, that would be great! I have attached the actual ChatBot file, so you could take a look at it (I had to upload the text file, because I couldn't upload the actual java). Magpie4.txt
  2. I have another problem... I cannot access some websites because of the Java security, but when go to the security settings of Java, it only shows the 'Very High' and 'High' security settings. It does not show the 'Middle' security. I used to have it, but for some reason it is not there anymore. I am using a Mac. It looks like this.
  3. Ohh, wow. That explains it, but what am I supposed to replace the string with? I'm sorry for asking so many questions, but I'm completely new to this... But thanks to everyone that helped! I wasn't expecting so many replies
  4. The complier is telling me that the apostrophes are "illegal characters." Thank you for your detailed explanation, but I thought that the second one, "b = 'c'" should not work because c has not been declared in the beginning. Or does it not matter?
  5. I am new to programming and I do not know what output this code makes. I tried to compile it, but there seem to be errors on the apostrophes. Please explain why there are apostrophes on the first two and not the last one... Thanks! public class FirstProgram { public static void main(String args[]) { char a, b; a = 'b'; System.out.println(a); b = 'c'; System.out.println(b); a = b; System.out.println(a); } }
  6. Is it possible for Java to have two different variables named "number" and "Number?"
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.