Help in assign-solve errors

hi,
I am new to java and and struggling with this program i have to complete for next week.
I have create a person class. And a student class which inherit from person class.
When compiling i get 2 errors.
lec.java:126: non-static variable this cannot be referenced from a static context
                         std[i] = new Student("1","1",1);
^
lec.java:90: inner classes cannot have static declarations
public static void main(String Args[])throws IOException{
Hope someone can help me in solving this problem :)
the codes are:
import java.io.*;
//******************************************************8
//******************************************************8
//+++++++++++++++
class Person{
     String Fullname;
     //String Empno;
Person(String Fullname){//,String Empno
     this.Fullname=Fullname;
     //this.Empno=Empno;
public void set_Fullname(String Fullname)
     this.Fullname=Fullname;
//public void set_Empno(String Empno)
     //this.Empno=Empno;
public String get_Fullname()
     return this.Fullname;
//public String get_Empno()
     //return this.Empno;
//+++++++++++++
//++
public class Student extends Person{
private String StudentNo;
private float grade;
//Student(){};
public Student(String Fullname, String StudentNo, float grade){
     super(Fullname);
     this.StudentNo=StudentNo;
     this.grade=grade;
public void set_StudentNo(String StudentNo)
     this.StudentNo=StudentNo;
public String get_StudentNo()
     return this.StudentNo;
public void set_grade(float grade)
     this.grade=grade;
public float get_grade()
     return this.grade;
//************************************************main menu
//77
public class sophie
public static void main(String Args[])throws IOException{
BufferedReader br= new BufferedReader(new InputStreamReader (System.in));
String str;
int max=100;
Student std[] = new Student[max]; //Declare 10 persons..
int option,i;
float grade;
i=0;
/**for (int i = 0; i<5; i++){
System.out.println("************************");
System.out.println("I AM STUDENT "+i);
System.out.println(std.get_Surname());
System.out.println(std[i].get_Othername());
System.out.println(std[i].get_Course());
System.out.println("************************");
do {
System.out.println("*************MAIN MENU ***********");
System.out.println("1. ADD ENTITY");
System.out.println("2. PRINT ALL ENTITY");
System.out.println("3. PRINT SOCIAL EVENT LISTS");
System.out.println("4. Exit");
System.out.println("************************");
System.out.println("PLEASE ENTER OPTION ::> ");
str = br.readLine();
option=Integer.parseInt(str);
switch(option)
     case 1: {
          System.out.println("DISPLAY ADD MENU");
                    System.out.println("************************");
                         std[i] = new Student("1","1",1);
                         System.out.print("Please Enter Fullname::> ");
                         str = br.readLine();
                         std[i].set_Fullname(str);
                         System.out.print("Please Enter Student No::> ");
                         str = br.readLine();
                         std[i].set_StudentNo(str);
                         System.out.print("Please Enter average grade ::> ");
                         str = br.readLine();
                         grade= Float.parseFloat(str);
                         std[i].set_grade(grade);
                         System.out.println("************************");
          i=i+1;
          break;
          //nnnnnnnn
//case for student
          //nnnnnnnn
     case 2:     {
               System.out.println("YOU ARE IN OPTION PRINT ALL");
for (int stdno = 0; stdno<i; stdno++)
System.out.println("************************");
               System.out.println("I AM STUDENT "+stdno);
               System.out.println("Fullname ::> "+std[stdno].get_Fullname());
               System.out.println("Student No ::> "+std[stdno].get_StudentNo());
               System.out.println("Grade Point Average ::> "+std[stdno].get_grade());
               System.out.println("************************");
               break;
case 3:
               System.out.println("YOU ARE IN OPTION PRINT SOCIAL EVENTS");
for (int stdno = 0; stdno<i; stdno++)
          if (std[stdno].get_grade()>3.7)
          System.out.println("************************");
                         System.out.println("I AM STUDENT "+stdno);
                         System.out.println("Fullname ::> "+std[stdno].get_Fullname());
                         System.out.println("Student No ::> "+std[stdno].get_StudentNo());
                         System.out.println("Grade point Average ::> "+std[stdno].get_grade());
                         System.out.println("************************");
          break;
//+++++++++==
}//end switch
}while (option!=4);

In addition to my previous suggestions (see http://forum.java.sun.com/thread.jsp?forum=54&thread=562390&tstart=0&trange=15), also ensure that all your brackets are matched. where are Person and Student classes located? try to put them in their own files, not where your main method is located.

Similar Messages

  • Please help me to solve error: Split mapping created no messages

    Hi Experts,
    I am facing Split mapping created no messages  when i run my scenario.
    My Scenario is : Proxy to FILE.
    I am triggering Proxy and based on one condition i am generating different Flat Files.
    Now when i do this i am getting error :Split mapping created no messages in SXI_MONITOR.
    When i check this in Message Mapping by taking data from SXI_MONI its working fine...
    but when i trigger the data from RUNTIME WORKBENCH its throughing the error.
    When i remove the NameSpaces <ns0:message>
    and <ns0:messages1> its working fine.
    How can i solve this issue.
    Even though i removed Namespace in Message Type, i am getting the error.
    I changed occurance of Target message to O..unbounded both in Message Mapping and Interface Mapping.
    Its working fine in Message Mapping, problem occurs only when i run end-to-end scenario.
    So please help me to solve this issue.

    I think there might be mismatch between your name spaces.
    may be this link might help you
    Split mapping created no messages -Mluti Mapping
    are you getting the same structure from your proxies whatever structure you have in your XI structure(sender) and NS should match.
    but I dont have exp with proxies.
    Sri

  • HELP! Cant solve error message jdownload.class

    Hi everybody cant solve this problem with this error message when IE is
    trying to start some applet function on some web sites using this java class ( jdownload.class )?!
    getting this error message: Exception:java.lang.ClassNotFoundException:jdownload.class
    found something about this on this forum and the solution would be to edit the autoexec.bat lines for the path for java ..!
    But this didn�t work out for me - i got no lines in autoexec.bat , it�s empty ..
    So if anyone can help me out that got more brains than me about this error - please help .
    best regards: mike lindmark sweden
    pc info: Win xp pro running IE 6.0 with java for xp installed ..!

    http://forum.java.sun.com/thread.jsp?forum=54&thread=206738
    http://forum.java.sun.com/thread.jsp?forum=54&thread=263239
    http://java.sun.com/j2se/1.4/docs/tooldocs/windows/classpath.html
    If this isn't enough, just search the forums for "xp classpath"
    chuck

  • My Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    my Creative Cloud subscription has expired, and I assigned the monthly payment, but I can not open any progam creative cloud, I need help how to solve this problem

    Carlos-
    Start by signing out and back in to see if it will see the subscription: 
    How to sign in and sign out of creative cloud (activate/deactivate)
    If the apps are installed fine and close after launch see this link:
    CC applications close immediately after launch
    If the problem is something different, please let us know the error you see or what is happening on the screen so we can advise  you on a solution
    Pattie

  • HT201210 Can anyone tell me exactly what Error 23 is?! WHY does Apple assign an error # but then NOT explain what that is?! I'm trying to restore an iPhone 3G. Please help! Thx.

    I CANNOT restore my iPhone, so now I'm stuck with a useless iPhone because I can't complete Restore - because Error 23 keeps coming up! Ugh...it bugs the heck out of me, that Apple assigns an error number without explaining (a) what that IS, (b) taking or redirecting to a SPECIFIC troubleshoot page for THAT error. I've wasted lots of time doing all the stuff already suggested but Error 23 persists! Please help or I've just lost my lovely old-design 3G, which I really am loathe to give up for one of those ugly new boxy too-long slim things... (Which cost $200, 2 boot!)

    Thx BUT =as-said, I've tried ALL the suggestions - including reading through the link you just suggested/posted (but just for good measure, i've just re-read thru it again!). I noticed from this list the first time i read thru it, that Error 23 didn't appear anywhere on this list of various (numerous!) error numbers. So/ergo, i still don't know (a) what exactly this error IS, (b) how to fix/get past/resolve it.
    I don't have an Apple store anywhere near me. Even if I did, I wonder whether they would (a) be willing to (b) able to fix it @ the so-called Genius bar? Any thoughts on this? (Obviously, if there were an Apple store nearby, I'd go there & try; as-is, it would entail an extra trip & an expense costing as much as buying a new iPhone!)

  • ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    ýesterday  my iphone 5c screen  suddendly  shows connect to itune and i try to restore it using itune but halfway i got a message error occured (14). please help me in solving this problem.

    what did you learn when you search the internet for iPhone error 14?

  • An error encounter on test devise (real devise) i.e "apple mach -o linker error linker command failed with exit code 1", please any body help me to solve the problem

    Hello, I am using tesseract api in my app, which run perfectly on simulator but on test devise (real devise) it is showing an error i.e "apple mach -o linker error linker command failed with exit code 1", please any body help me to solve the problem

    if you can't compile the webutil.pll in your forms developer you need to set the forms_builder_classpath in you windows registry. You have to add the frmwebutil.jar,jacob.jar to the registry key. The configuration files you mention are for running the forms.

  • Help to solve error

    hai friends,
    when i run a project in netbean IDE i got the error:
    F:\Resource Allocation for Cluster Computing is not a valid directory
    at org.apache.tools.ant.taskdefs.Java.setupWorkingDir(Java.java:848)
    at org.apache.tools.ant.taskdefs.Java.setupExecutable(Java.java:818)
    at org.apache.tools.ant.taskdefs.Java.fork(Java.java:781)
    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
    at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
    at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    at sun.reflect.GeneratedMethodAccessor133.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
    at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498)
    at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
    Java Result: -1
    BUILD SUCCESSFUL (total time: 0 seconds)
    please help me to solve this

    Does the directory exist?
    What output do you get when you open a command prompt window and type
    C:\> dir "F:\Resource Allocation for Cluster Computing"

  • Help me to solve the Error occuring after importing the VO,EO files

    Hi,
    I created EO,VO by extending the Seeded EO,VO respectively, Substitute the BC4J also.
    i import the files using jpximport
    its successfully imported, and i'm facing error while opening the application under that responsibility.
    when i try to open the cash forecasting application it shows error.
    i mentioned the some part of the error below
    oracle.apps.fnd.framework.OAException: Could not load application module 'oracle.apps.ce.forecast.cf.server.ForecastAM'.
    ## Detail 0 ##
    JBO-30003: The application pool (legend.igloocorp.comTEST13000oracle.apps.ce.forecast.cf.server.ForecastAM) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.NoDefException, msg=JBO-25002: Definition xxi.oracle.apps.ce.schema.server.IglFcTrxCellsEO of type Entity Definition not found
    i checked the error in google and metalink for the following no.
    JBO-30003 is generally either a simple misconfiguration in the bc4j.xcfg file - e.g. the JDBC connection information is wrong. Or the database is simply not available.
    but i checked those settings also. every thing is working fine.
    please any one help me to solve the issues.
    whether i need to extend AM file also.
    Thanks
    Aswath Thaniga

    As per Oracle recommendation your path should be
    /xxi/oracle/apps/xxi/oracle/apps/ce/schema/server/ -- in case of custom application
    /xxi/oracle/apps/pos/oracle/apps/ce/schema/server/ -- in case of extensions.
    where xxi is your company name.. don't say xxi as such..
    If your company name is microsoft, then micro.oracle.apps... ...
    But it doesn't got anything to do with your error... Please execute the following command
    ls -lrt $JAVA_TOP/oracle/apps/xxi/oracle/apps/ce/schema/server/
    and post the results.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Please help me to solve screen shot errors...

    HI All,
    Please find the attached screen shot.
    Please assist me to solve screenshot errors.
    I am really struggling to solve errors.
    Thanks for your help in advance.
    Regards
    Durai S
    Attachments:
    Screen shot.PNG ‏40 KB

    Thanks for your reply.
    After adding <windows.h>, the redeclaration and redefinition errors are resloved, but i am facing new errors.
    Please see the attached file for error screen shot.
    Thanks for your help in advance.
    Regards
    Durai S
    Attachments:
    Missing prototype.PNG ‏19 KB

  • I can not connect my i phon with my pc it shows athorised computer when i am trying to do authorised process the process done but again i connect my phon again show this errore please help me to solve my prob....

    i can not connect my i phon with my pc it shows athorised computer when i am trying to do authorised process the process done but again i connect my phon again show this errore please help me to solve my prob....

    I have clicked on the  connect button, but it brings up the same There is a problem connecting,  and I have also tried SMB://
    i tried pinging the ip address with in termial and it times out.  
    From my windows PC and I can access my MacBook Air just fine,

  • Help me to solve msvcp80.dll error

    Every time i execute any Program it shows following error. I've already reinstalled , refreshed my PC but it doesn't working. Please help me to solve this problem.

    What is exact wording of your proble/error?
    Check consistency of your sustem with sfc function and share your findings here (log file - upload it and publish url)
    http://support.microsoft.com/kb/929833
    Also read
    http://pcsupport.about.com/od/findbyerrormessage/a/msvcp80-dll-not-found-missing-error.htm
    HTH
    Milos

  • Help me for solve this Question this is my problem

    help me for solve this Question this is my problem
    i installed EBS 11i fresh not vision
    i did cart of account and did set of book
    then assigned it with profile option gl set of books name
    and when enter to make ajournal appeare this messege
    [http://www9.0zz0.com/2009/10/06/03/232202588.jpg]
    [http://www9.0zz0.com/2009/10/06/03/634050066.jpg]

    Hi,
    Not sure why are you getting this kind of error (which is pointing to a URL with Jpg file) while creating a journal.
    Could you please bounce your server once and try..
    Please let us know if the error/warning stopping you to enter a journal in GL??
    We don't think profile option is a show stopper here.... We assume that you have assigned Sets of Books, MO: Operating unit & HR USer Profile option at Responsibility level correctly....
    Regards,
    S.P DASH

  • RFC Receiver adpater Connection problem , Help us to solve ?

    Hi  Friends ,
                          Our scenarilo is Mail to RFC. It was running fine. In RFC Receiver adapter i have given <b>Maximium connection property to 1</b> .
                      While multiple set data passed to rfc will connection problem will come ?
                     Most data not uploaded . I am getting the following error.
                     <b>   If i set max connection to 5 . It is 5 times or more than that it is pusing the data .</b>
                    i am getting the following error <b>while i set the Max   connection to 1 .</b> . <b>Any other place i need to change configuration ?</b>
                   <i><b> - Error: 2007-09-24 10:51:22 GMT-05:30: Message processed for interface YRFC_EXT_WARR: com.sap.aii.af.rfc.afcommunication.RfcAFWException: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: resource error: could not get a client from JCO.Pool: com.sap.mw.jco.JCO$Exception: (106) JCO_ERROR_RESOURCE: Connection pool RfcClient[CC_EXTE_WAREN_2W_RFC_RECEIVER]e7fa21f86ec535e883636c0beffc0f0c is exhausted. The current pool size limit (max connections) is 1 connections.</b></i>
                            Please give the description . I have referred many likns . Help us to solve this problem .
    Regards.,
    V.Rangarajan<b></b>
    Message was edited by:
            ranga rajan

    Hi,
    Have a look at this.This will help you.
    1.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f3f93ee7-0c01-0010-2593-d7c28b5377c2
    2. https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3103eb90-0201-0010-71af-be6f4a6f61d1
    Regards,
    Akshay Jamgaonkar.
    Reward points if find useful.
    Message was edited by:
            Akshay Jamgaonkar

  • Help me to solve this

    I can't view My JSP file I am getting Error Message
    Java Compile not Found
    Unable to Compile the Source file for JSP
    I copied tools.jar to servers lib dir
    But Yet i get the same message
    Pls help me to Solve this Problem

    Most common cause of the problem: JAVA_HOME environment variable not set, or set incorrectly.
    It should point to your java directory: ie C:\java1_4\ NOT C:\java1_4\bin
    Another possible cause is spaces in the path names where you have installed applications.
    Check out this page: http://www.coreservlets.com/Apache-Tomcat-Tutorial/ for a tutorial on installing tomcat.
    If you can't sort it out on your own, we need more info:
    Where have you installed Java?
    Where have installed Tomcat?
    What is the value of JAVA_HOME environment variable?
    Good luck,
    evnafets

Maybe you are looking for

  • Export is making my video smaller on all sides?

    I can't really fullscreen videos when I convert them. I searched around for fullscreen but all anyone was talking about was making PP windows in fullscreen, sorry if this has been addressed. I took a screenshot to make things easy [IMG]http://i1124.p

  • Can Keynote spell check in different languages?

    Hello again, One more question: Can Keynote spell check in different languages? and... How? Thanks for your help. JP

  • Finding Restrictions passcodes in IOS 5

    My daughter has been playing with her itouch settings and has put on passcode restrictions, however she no longer has any idea what they are!  I have tried using a back-up extractor software however it does not give this information in IOS 5 and I ca

  • Is OMS needed when install management agent

    I just want to configure SNMP for oracle database, so I install management agent on database server using reponse file like this: /scratch/john/linux/agent/runInstaller -silent -responseFile /scratch/john/linux/response/additional_agent.rsp but it sh

  • Broken clips from CF card and import question

    I'm new to recording on a CF card and importing it into fcp. I shot an hour yoga session without stopping the camera the entire time. I recorded it in DV format. I'm using a Sony Z5 with a HVR-MRC1 card recorder. When I open the folder on the CF card