• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Ryan123

  • Rank
  1. I need help with Java

    [quote name='Nik02' timestamp='1313843049' post='4851576'] The package name doesn't technically have to be lowercase, but it has to match the physical directory of the package accurately and case-sensitively. It is merely a good practice to keep package names in lowercase, so that the naming scheme can easily be distinguished from class names (and a few other reasons). I've been programming for over 21 years now. I mainly use C++ and C# at work, but I can also handle a lot of other languages (like Java) somewhat comfortably. I started with monolithic style programming in BASIC variants, so it took a couple of years for me to grasp the object oriented and functional paradigms. [/quote] ohhh, is C++ hard? I heard that to make video games, you need C++... Can i do them in Java? I thought Java and C++ wasthe same thing? Imconfused...
  2. I need help with Java

    [quote name='Nik02' timestamp='1313841853' post='4851567'] The packages correspond to the physical directories that the class loader searches at runtime. If I remember correctly, the package names must match the physical deployment directory structure; also, Java is case-sensitive about the physical paths (even though the OS platform you're running the program in would not be). Your physical package directory uses all lower-case, but in your code file you declare the package name in mixed case. Modify the code file's package declaration to match the physical package name. It is a common practice to use all lower-case in package names. [/quote] ohhhhhh thank you man it worked! So the package name ALWAYS has to be lowercase? And by the way, how long did it take you to learnhow to program?
  3. I need help with Java

    [quote name='Nik02' timestamp='1313841068' post='4851560'] Try to change the package name to something different than the class name. [/quote] lol i cant cuz the package name is thename of the file. and the public class name has to be the same as thefilename.
  4. I need help with Java

    [quote name='Nik02' timestamp='1313839150' post='4851552'] There is a syntax error. You close the function parentheses too soon. [/quote] wait now something else is wrong. Look.
  5. I need help with Java

    [quote name='Nik02' timestamp='1313839150' post='4851552'] There is a syntax error. You close the function parentheses too soon. [/quote] Ohhhh wowwww i just noticed. THANK YOU so much i was so fustrated lol thanks i really appreciate it
  6. Hey everyone, im Ryan, im new here. im 15 years old and well im trying to learn how to program with Java. Right now, i am trying to make a box that says Welcome to Java! In my book, it says: Problem: Write a program that displays text in a message dialog box. Solution: The following code gives the solution to the problem: /* WelcomeInMessageDialogBox.java: * This application program displays Welcome to Java! * in a message dialog box.*/ import javax.swing.JOptionPane; public class WelcomeInMessageDialogBox { public static void main(String[] args) { //Display Welcome to Java! in a message dialog box JOptionPane.showMessageDialog(null, "Welcome to Java!") , "Example 1.2 Output", JOptionPane.INFORMATION_MESSAGE); //Exit the program System.exit(0); } } Im using netbeans for this, and on the lines JOptionPane.showMessageDialog(null, "Welcome to Java!") , and "Example 1.2 Output", JOptionPane.INFORMATION_MESSAGE); there is an exclamation point next to both of them. I tried to run the program and to see if the dialog box will appear, but it doesn't work. I don't know what I'm doing wrong. Here's a screenshot of what i am doing currently. im attacting thefile...
  • Advertisement