Vs level Variable of Variable severity rule.

Hello

I am trying to understand in what situations a Variable of severity level would be used rather than a State Variable. Can someone explain this, as far as I can tell from the documentation that the only practical difference is variable severity of level are only available in the condition as they are defined in.

See you soon.

Matt.

Your interpretation is correct, as seen in the documentation , these variables have different fields of application.

Rule variables can be referenced in any level of gravity but the level of variable gravity can only be referenced in the expression associated with the level of severity in which are defined variables.

Keep in mind that we have the variable of register global and available to all objects and types of topology.

Golan

Tags: Dell Tech

Similar Questions

  • Help on setting level Variable of severity Foglight V5

    Hello

    I created a custom Foglight rule that fires when the memory of hash reached a record variable that is defined.  The Condition is:

    condition = (avg (#memory_sort_hash_mb) for 5 minutes # > = registry ("Memory_SortHash_Critical"));

    The rule works very well, however I am having a problem displaying the value of memory.  I tried different ways of determining the scope to get the value, but I think that because it is an average value, it gives me problems.  Here's how I'm defining it as a Variable of severity level:

    Scope.get ("memory_sort_hash_mb")

    I can't get a return value of "null" However, no matter what I try.

    Any help would be appreciated!

    Thank you

    Paul

    Hi Paul,.

    In your Variable to the severity level, you can use the same form as a condition.

    You can get the current value of the metric of "memory_sort_hash_mb" with:

    #memory_sort_hash_mb #.

    Kind regards

    Brian Wheeldon

  • Thread Safe variables - several symbol at link definitions

    I'm going through the tutorial "Multithreading in LabWindows/CVI.

    The following line is in the tutorial about the variables in Thread-Safe:

    "If you need to access the variable in thread-safe from more than one file source, use the macro DeclareThreadSafeScalarVar or DeclareThreadSafeArrayVar in an include (.h) file for create statements for the accessor functions."

    OK works with a source file, but when I include the header file in a second file from the source, I have "Several definitions for symbol" errors when link for all functions of accessor in the two source files.

    It's probably something simple, but after a few hours I'm at a loss. Any ideas are appreciated.

    Scott T

    You should have DefineThreadSafeXXX in exactly a source file and a DeclareThreadSafeXXX in any number of source files (or in a file header included in the source files). The following works for me in 2012 of the CVI:

    / * temp.h * /.

    #include

    DeclareThreadSafeScalarVar (double, Num);

    void test (void);

    * Temp.c * /.

    #include "temp.h".

    DefineThreadSafeScalarVar (double, Num,-1);

    void main (void) {}

    InitializeNum();

    test();

    }

    / * temp2.c * /.

    #include "temp.h".

    void test (void) {}

    SetNum (1.0);

    }

  • Is it possible to truncate level variables of gravity for alerts by e-mail

    I currently include the name of the agent in my alert e-mails. Is it possible to truncate the name of the agent as well as the full name does not appear in the emails? Our security environment is now called for this so don't not to share the names of full server with third-party recipients.

    Ex. var5 expression is scope.get("agent/host/name")

    My server name is FGLserver1234

    Is there a way to get only the first three characters and the last four characters as FGL1234?

    Or even to pull just the last four characters 1234?

    Yes

    You can use the groovy scripting language to analyze the host name in the severity variable and then return the adjusted name.

    Here is a small script for example groovy

    hostName=scope.get("agent/host/name");

    replace hostName = hostName.toString () ("Server", "-");

    return (hostName);

    David Mendoza

    Foglight Consultant

    When you get the example above works please click on question answered - thanks

  • ATTRPARENT dimension of the text attribute to several levels of construction with a rules file

    Hello

    My first post here.

    I'm trying to create the dimension generation rule to create a dimension of the multilevel text attribute and then combine with the basic dimension.

    So far, it is difficult.

    With regard to my experience:

    -J' have a relatively basic understanding of the rules of charge both with regard to the data loads and define the updates - I find this quite confusing area and the documentation does not help that much

    -J' only started using dimensions attribute, so for me it's a new concept, but we are already quite useful in certain applications

    -J' I try to automate the process of construction of dimension attribute, and then associating attributes with the basic dimension

    I use the following documentation as a guide:

    Building size attribute and associate attributes

    http://docs.Oracle.com/CD/E12825_01/EPM.111/esb_dbag/frameset.htm?dotdimb.htm

    and / or

    Work with the attribute multi-level Dimensions

    http://docs.Oracle.com/CD/E26232_01/doc.11122/esb_dbag/frameset.htm?ch21s06s05.html

    (essentially the same source in both cases)

    The ultimate goal is to replicate one of our existing recently created attribute dimensions of a cube to another.

    I built a few versions of the required flat file and the corresponding rules file, but none worked.

    I tend to get the following validation error message:

    This field is defined as an ATTRPARENT. The following column must be a field of association attribute type.

    As I got stuck so I gave to the current actual attributes and moved on to experimenting with the sample / base cube.

    I built a flat file that is supposed to create a new dimension of text attribute named ABC with two attributes level structure:

    ABC

    A

    AA

    AB

    B

    BA

    BB

    and associate it with the dimension of the product in the following way

    200-10 AA

    200-20 AB

    200-30 BA

    200-40 BB

    The flat file looks like this:

    "AA"      "A"         "200-10"               "A"         "AA"      "200"

    "AB"      "A"         "200-20"               "A"         "AB"      "200"

    "AB"      "B"         "200-30"               "B"         "AB"      "200"

    "BB"       "B"         "200-40"               "B"         "BB"       "200"

    and the rule file has 6 matching columns with titles as follows:

    Level0, LEVEL1 ABC, ABC Level0, product ATTRPARENT0, ABC ABC0, LEVEL1 product, product

    all agree with what the documentation says.

    The first 2 columns are intended to define and create the dimension of the attribute, while the 4 next make association...

    I couldn't the above rules file to validate.

    The same validation error message appeared as previously:

    This field is defined as an ATTRPARENT. The following column must be a field of association attribute type.

    However when I tried to actually update the outline of the mistakes of dimbuild.err file has been created which gives some additional clues:

    \\ATTRPARENT column 4 must precede a numeric or datetime column attribute association

    Now... Finally the interesting part...

    Back to the documentation...

    I don't mind if the size of the attribute is generated and then those associated with step or in two separate steps.

    I try to do both tasks in one step only because that's what the documentation seems to suggest attributes at several levels.

    First of all I read:

    Note:

    If you work with a multilevel dimension attribute or with a dimension of the attribute of the digital type, Boolean, or date, the rules file requires an additional field. See working with Dimensions of the multilevel attribute.

    Yes, I work with a dimension of the multilevel attribute so the above statement applies (I guess) and so I'm going to see what works with several levels attribute Dimensions has to say.

    Then, I read:

    When an attribute is part of a digital multi-level, Boolean, or dimension attribute date, the source data must include columns for all generations or the size of the attribute levels.

    Fair enough... so I do what they say... my attribute dimension is at several levels, so I can assume that the statement above applies...

    So, I build my rule in accordance with the guidelines above.

    And then, as we have already mentioned, I get the error message about ATTRPARENT and when I read, it turns out that ATTRBPAREN cannot be used for numeric or date attribute dimensions !

    I'm totally confused at this point.

    What about the attribute text multi-level dimensions ?

    They are several levels but they are NOT numeric or date those!

    The documentation does not seem to tell what to do in this case...

    Anyone build something like that?

    What is the thing that I'm missing?

    What about

    I'm glad that you got to work. I tested and that is to create the dimension attribute and associate it with the rule of the load.

    You could ignore the construction size manually. Remove the attribute dimension. The rule1 go for the Dimension settings under the definition of Dimension tab. Then right-click on the product and change the properties. On the attribute tab, add 'Test' or whatever you want to call the attribute, and assign the text type. He adds the attribute and associate it with the basic dimension when it create the hierarchy. Note that the rules could actually be reversed where you create members of level 0 and then more later to create the hierarchy.  Of course you must pass the size of the attribute association to the other rule

  • Access the different level variable?

    Normally, I declare a variable at the top of all my code as, var myObj: Myobj = new nouvelles();...

    but for some reason any the the new declared variable is required to give in the service, as showing the same objects in the library in assistance for loop.

    I noticed this variable declared within a function are not accessible outside the function an event handler or another function...

    I've seen code that make possible my declaring a new variable? like:var mc:MovieClip = MovieClip (e.currentTarget); var mc:anotherObj =anotherObj(e.target);

    How all these works? Thanks in advance.

    It is called range - variables are in scope. He recalled how the rest of the program can display variables. Basically, there are two kinds of scope - local and global. When you declare a variable inside a function, it has local scope, and only the code within the function can refer to the variable. Variables declared outside functions have a global scope, and any function can refer to them.

    When you do var myVar:String;  you declare the variable.

    When you come to myVar = without the var in front, you reference the variable already declared.

  • Variable severity scale

    Increase or decrease gravity (like the wind).

    Thanks for the request - this is planned for 4 Preview.

  • Error exporting in the level of query with several conditions

    When I run the following query to export with the result.



    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY = "" WHERE deptno > 10 and sal! 2850 = "' LOG = log011.log FILE = exp.dmp"

    Export: Release 10.2.0.1.0 - Production on Wed Jan 30 10:01:27 2013

    Copyright (c) 1982, 2005, Oracle. All rights reserved.


    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With partitioning, OLAP and Data Mining options
    Export performed WE8MSWIN1252 and AL16UTF16 NCHAR character set

    About to export specified tables by conventional means...
    . . export the rows in the table EMP 10 exported
    EXP-00091: exporting more than questionable statistics.
    EXP-00091: exporting more than questionable statistics.
    Export completed successfully with warnings.



    But when I run it with the following condition, then it displays the following error...




    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY ='"WHERE deptno > 10 and work!" = 'CLERK' ' ' LOG = log011.log FILE = Exp01.dmp.
    LRM-00111: no closing quote for value 'LOG = log01'

    EXP-00019: failure of the treatment of parameters, type 'HELP EXP = Y' help
    EXP-00000: export completed unsuccessfully


    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY = "WHERE deptno > 10 and work! = 'CLERK' ' LOG = log5.log FILE = exp01.dmp
    LRM-00112: multiple values not allowed for the parameter "query".

    EXP-00019: failure of the treatment of parameters, type 'HELP EXP = Y' help
    EXP-00000: export completed unsuccessfully


    Please suggest a solution for this.

    Hello

    Single quotes used for CLERKS are very probably the origin of the problem.
    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY ='"WHERE deptno 10 > and job!" = 'CLERK' ' ' LOG = log011.log FILE = Exp01.dmp.

    try to replace this
    C:\Documents and Settings\ITL > exp scott/tiger@orcl tables = (emp) QUERY ='"WHERE deptno 10 > and job!" = "REGISTRAR" "' LOG = log011.log FILE = Exp01.dmp.

    Two single quotes (no quotes) to place an apostrophe for CLERK.

    Thank you
    Padma...

  • Distribution rules and registry variables between vFoglight facilities

    Hello!

    We are responsible for a number of clients vFoglight facilities. I wonder if there is a more automated way to manage rules vFoglight & variables of register (RV) (alarms). Many of the default rulesettings are questionable. I am looking for a solution where you can pack all your custom rules and RV and then deploy these settings on other facilities at vFoglight.

    I looked through the vFoglight 6.7 guide http://us-downloads.quest.com/Repository/support.quest.com/vFoglight/6.7/Documentation/Management%20Server/vFoglight_CommandLineReference.pdf command-line Reference

    There, on page 119, I found the command of the utility configexport (export or import of a monitoring policy). I already said that if you only keep the changes you made in for example in the rules, you could distribute these through differrent vFoglight facilities, is this correct? Is there someone who has created a script for this in the community?

    I learned that the best practices for managing individual and variable registry rules must copy each rule and RV in the user interface and then configure the new rule with the new RV in the rule editor.

    To do this is a very repetitive task. Is it possible to automate this supported/not supported? Also is it possible to distribute these customized rules & RV between vFoglight facilities, it automate still further?

    Thanks in advance!

    Erik Alm

    Repetitive procedure #1

    Repetitive procedure #2

    Repetitive procedure #3

    Edit

    I had implemented a policy of control of the commandlline with the command:

    fglcmd.bat - usr foglight - pwd - srv - port 443 ssl - cmd - util:configexport f strategy. XML

    When I imported a strategy later. XML where I had deleted all the content with the exception of I reign with the command

    fglcmd.bat - usr foglight - pwd - srv - port 443 ssl - cmd - f policynew.xml util:configimport

    The rule has been changed!

    If (@event.isSet("report/errorMessage")) {}
    Return @event.get("report/errorMessage");
    } else {}
    Return 'Report' + @event.get("report/reportName") + ' run on ' + @event.get("report/dateRun") + 'is fixed. This IS a TEST 20121114 Erik Alm«;»
    }

    The only question is

    1. If I delete all content instead of 1 rule as above nothing has changed

    2. If a problem arises due to an import of strategy 'bad', it can be solved with an import of the backup strategy?

    3. is it possible/safe to distribute the policy like this setting, change the multiple rules/RVs in vFoglight different facilities? With other words, you I configfile change rulesetting in several facilities? (If they are of course the version of fms even)

    4. If the rule/RV is not created/copied before that, these rules/RVs are created?

    5. anyone done this before and created a script that they would like to share?

    Thanks again!

    Erik Alm

    Edit 2

    It seems that it is possible to import new rules and have them appear in the management dashboard with the possibility of enableling rule the. A bug is interesting that they disappear from the new data management dashboard, but are visible in the dashboard management legacy rule.

    1 - does anyone know if the existing rule management dashboard will be removed anytime soon?

    I learned that there is a specific effect is called fglIDE cartridge. I have installed and tested in our product environment. It certainly has a great feature, and we could really use it.

    My respects to Stefan Marx to develop it!

    But I wonder that will be included in the Foglight APM Solution?

    Of http://fglide.apmcentral.org/downloads/

    Disclaimer

    This software is provided as Freeware tools and is not part of the APM Foglight Solution or shipping. It it is not officially supported but if you have any concerns or Questions please use the Foglight community to post these or fill a Github issue

    Or Quest Software has a similar solution that is supported?

    Thanks in advance

  • Rule Variables display business as Undefined following import for the calculation Manager

    On the Variables tab in a source system Calc. Most of our business rules Manager have defined variables.

    However following export / import in a Calcualtion System Manager target the same variables appear as "undefined". Therefore, I am unable to validate the rules in the target calculation System Manager as it requires me to enter valid values for each variable before doing so.

    It is a section of the xml file used to export/import showing a particular variable and its reference in a rule:

    < variable id = "107" name = "FCOrtpBudgetHolder" product = 'Planning' type = 'Member' use 'const' = >

    < property name = "description" is used to specify the support Budget, can be level 0 or/Property parent >

    < property name = "application" FCO/Property >

    < property name = / false Property "allowMissing" >

    < property name = / false Property "useLastValue" >

    < property name = "convert" / Real Property >

    < property name = / Property select Budget holder "prompt_text" >

    < property name = 'dimension' BudgetHolder/Property >

    < value / >

    < / variable >

    < rules

    < rule id = "320" name = 'FCO_3YrAdjBud_AdminRec' product 'Planning' = >

    < property name = "description" BusAmend_HBR_001: THIS RULE WILL COPY DATA to ENTRY AGAINST INPUT_TOTAL_SECTION to no. SECTION if USERS SELECT INPUT_TOTAL_SECTION, OTHERWISE IT TO THE/Property SECTION 'TOTAL' MEMBER AND COPY IN INPUT_TOTAL_SECTION >

    < property name = "application" FCO/Property >

    < property name = "plantype" FCO/Property >

    < property name = "display_label" FCO_3YrAdjBud_AdminRec/Property >

    < property name = "comment" / >

    < variable_references >

    < variable_reference id = "107" name = "FCOrtpBudgetHolder" >

    < property name = / Property "seq" 1 >

    < property name = "application" FCO/Property >

    < property name = / false Property "useAsOverrideValue" >

    < property name = "scope" FCO/Property >

    < property name = 'type' 3/Property >

    < property name = "hidden" / false Property >

    < property name = "sΘcuritΘ" use by default/Property >

    < property name = "nom_regle" FCO_3YrAdjBud_AdminRec/Property >

    < / variable_reference >

    Rest of rule etc...


    All the

    Forget that - I showed me the error of my ways. The simple clearing browser solves this problem - never thought!

  • Forbidden: Variables of level object in the event handlers?

    Hello world

    So I thought I had a pretty good handle on works the scope in Java, but for some reason any that a sentence in the Identity development documentation Manager is causing scratching me my head:

    28.3.1.1 development considerations

    [...]


    * Do not set the object level variables in the event handler.

    What exactly do you think they mean by that? Are we supposed to initialize variables, avoid new methods?

    All instance variables? I mean, that cannot be because how you can write useful code without instance variables?

    Or is it just an injunction on the locking and safety of threads?

    Thanks in advance!

    -Mark

    Here object variable average instantiate every variable which is at the level of the object.

    This is the reason for this:

    Once in the case of recon user gets into the loop to break out of loop only when the reconciliation of the users is made and so if you have instantiated any variable to the object variable and then after a user the value of this object will not get instantiated and will choose ythe value what first user changed.

  • Access rule to the rule-driven event Variables

    Hello!

    Background:

    Here's what I'm trying to do: I was hoping someone might be able to help me with this.

    I created an event rule without a scope that will be sent, if the name of the event contains a prefix set, as follows;

    {if(@event_name.) Contains ("MYFILTER_")}

    Returns true;

    } else {}

    Returns false;

    }

    The action is a command line action that activates a special probe in SNMP before that we have installed on the server.

    The problem:

    I want to access a variable in the variable filter rule. Essentially, EACH rule containing MYFILTER_ as a prefix has a variable defined as a variable of @callGroup RULE. This variable considers the specified parent service and tire part of the name of the service that we have designed to be always the band guard for this alarm/event.

    The solution that I'm looking should look like this:

    On the event rule:

    Variable: callGroup

    Type: Expression

    Value of the expression: @event.get ("callGroup");

    On the MYFILTER_ rule:

    Variable: callGroup

    Type: Expression

    Value of the expression:

    def foundParent = false;

    targetService def = 'unknown ';

    i = 0;

    While (i< scope.parents.size()="" &&="">

    obj = scope.parents def;

    {if (obj.topologyTypeName.Equals ("FSMService"))}

    If (obj. Name.Contains(":") & obj.name.contains("-")) { //This is the regular expression to our designated 'parents services' }

    targetService = obj.name;

    foundParent = true;

    }

    }

    i ++ ;

    }

    {if(!foundParent)}

    for (x = 0; x

    for (y = 0; y)

    obj = Scope.parents [x] .parents;

    {if (obj.topologyTypeName.Equals ("FSMService"))}

    If (obj. Name.Contains(":") & obj.name.contains("-")) { //This is the regular expression to our designated 'parents services' }

    targetService = obj.name;

    foundParent = true;

    }

    }

    }

    }

    }

    originService = targetService.split(":");

    parentService = originService [0];

    Return parentService.split ("-") [0];

    Bottom Line: How can I access this other value or a variable existing rule from the interface of event action rule?

    access to the content of the rule Variables is unfortunately not possible by using the generated alarm or event driven rule.

    But I think you can use the same rule of expression led to the event. The only problem is that your event driven rule is not you need to replace worn with

    Server. TopologyService.getObject(@event.topologyObjectID)

    Like this

    def scopedObject = server.TopologyService.getObject(@event.topologyObjectID)  // use the @event to find the alarm scope !!!
    
    def foundParent = false;def targetService = "unknown";
    
    i=0;while(i < scopedObject.parents.size() && !foundParent){  def obj=scopedObject.parents;  if(obj.topologyTypeName.equals("FSMService")){    if(obj.name.contains(":") && obj.name.contains("-")){ //This is the regex of our designated "parent services"        targetService = obj.name;        foundParent = true;    }   }  i++;}
    
    if(!foundParent){  for(x=0;x;       if(obj.topologyTypeName.equals("FSMService")){                  if(obj.name.contains(":") && obj.name.contains("-")){  //This is the regex of our designated "parent services"           targetService = obj.name;           foundParent = true;         }       }     }  }}
    
    originService = targetService.split(":");parentService = originService[0];
    
    return parentService.split(" - ")[0];
    
  • Range variable in Flex/Flash

    Both Flex 2 and 3 compilers have warned me about the definitions of variables in double when the variables are completely different scopes. This behavior is different from any other language I've used. To verify this behavior, I used the following code:

    If (1 == 0)

    {

    var test: int = 88;

    logger.info ("test" + test.toString ());

    }

    on the other

    {

    test = 99;

    logger.info ("test2" + test.toString ());

    }

    The code compiles, executes, initializes the test variable, and the place to 99. The journal entry in the (1 == 0) bloc, as expected, is not written. To rule out the possibility of a kind of implicit variable declaration, I put comment line [var test: int = 88;] and the compiler quickly published an undefined variable error. Any additional perspective on why the test is initialized in this code, or why it would be probably considered correct behavior would be appreciated.

    The smallest unit of the scope of the variables is in a function.  Unlike Java and Flex C++ does not allow variables at the level of the blocks that are variables declared in {} in a function.   Even if your variable is defined in the block, it is considered to be a function level variable.

  • Using global variables in all scripts

    Hello

    I have a SOAP client which runs the runScript method.

    SOAP requests to three, one after the other, call runScript and run a jsx on the server.

    Can I have some session-level variables / global whereby I can access via scripts?

    For example, during the execution of the first script, I put a variable. And even once during the second and third queries SOAP, I use the variable (defined in the 1st script) in the 2nd and 3rd scripts.

    How can I get the above?

    I would really appreciate some help on this.

    You can use the #targetengine or insertLabel methods.

    Incapacitated, I would say, of #targetengine, "session01" is the specific session will be exist until InDesign is running, which is not desirable. Those who will destroy only when you exit your application. I don't think that there is no collection for rescue here.

    However, insertLabel and extractLabel can be used on specific DOM objects, according to your need, including the app object.

    If you want to share variables between scripts on a document so that you can store variables on the document object:

    doc.insertLabel ("name", "value");

    So, once the document is closed all the labels are gone. You can choose according to your requirement, you want application-level globals (then use app.insertLabel), level of the document (then doc.insertLabel), spread of level, etc.

  • problem of local variable

    I do an app that takes an apartment number and the number of occupants in the apartment and then displays a number of statistics. So far I have not had too much trouble
    except on a which is probably a very simple problem.

    I have two buttons, and click on "store" information in the text boxes is entered in a table.
    My problem is with the next button 'Quit', this is where all the information is supposed to be displayed.

    All my variables that I need to "store" are local and are recognized in 'the if statement to quit smoking. Ive tried to declare outside of the IF statement, but it did not work.

    {code}
    public void actionPerformed (ActionEvent event)
    {
    Object source = event.getSource ();
    Apartment entry;

    If (source is store)
    {

    Integer aptNo = Integer.parseInt (input1.getText ());
    Whole Occup = Integer.parseInt (input2.getText ());
    entry = new apartment (aptNo, busy);

    if(aptNo > BUILDING_SIZE)
    JOptionPane.showMessageDialog (null, "That number of apartment does not exist.");
    of other if(occup > MAX_OCCUPANTS)
    JOptionPane.showMessageDialog (null, "too many occupants, only 20 are allowed per apartment.");

    on the other
    {

    [aptNo] = busy occupants;

    INPUT1. SetText("");
    INPUT2. SetText("");

    JOptionPane.showMessageDialog (null, input.getNumber (guests));
    }

    }

    If (source is quit)
    {
    I need the variables aptNo and busy here to put in my methods for output, but I don't know how to get them.

    }
    {code}

    EmmCeeVee wrote:
    Thanks for all the answers, it really helps me.

    Of course, my knowledge of local variables is bad because I'm passed around as your told and said the aptNo and professional activity outside the fi.
    All I need is for the button leave watch table (which comes to be modified by the previous button) and a bunch of output results.

    Heres where im at the:

    Your problem is the scope of variables.
    Here some variable you defined in actionPerformed they are local to this method (they are out of reach when the method is finished/called once again), on this, actionPerformed is called two times a store and once to quit. So you can not expect the value stored in store should be there always when you all quit smoking
    If you want the values available on the two actions then make a class-level variables.
    Below is a sample program, might help you.

    class Employee
    {
         String empName = null;
         int empNo;
         Employee(String eName,int eNmbr)
         {
              this.empName = eName;
              this.empNo = eNmbr;
         }
    
    }
    
    class CheckVariableScope
    {
            Employee empOb; // Here
         int eNo;
         String eName = null;
    
         public void checkScope(String action)
         {
                    //Instead of defining Employee reference variable, eNo and eName  in checkScope method, define it @ class level.
                    // in your case they are Apartment input, Integer aptNo and Integer occup
                     // like above i did.
                     // If i comment the class level variable and uncomment method variable, this program also give the same error.
    
              //Employee empOb;
              //int eNo;
              //String eName = null;
    
              if (action.equals("Store") )
                   {
    
                        eNo = 10;
                        eName = "Bob";
                        empOb = new Employee(eName, eNo);
    
                        System.out.println("The eName is : "+empOb.empName+" , empNo is : "+empOb.empNo);
    
                   }
                   if (action.equals("quit"))
                   {
                        System.out.println(" eNO from Object is : "+empOb.empNo);
                        System.out.println(eNo); //Error: may not have been intitialized
    
                   }
    
         }
    
         public static void main (String st[])
         {
              CheckVariableScope ob = new CheckVariableScope();
              ob.checkScope("Store");
              ob.checkScope("quit");
         }
    }
    

Maybe you are looking for

  • How to find the ' chrome: / / '.png icons?

    I found a script on userstyles.org that refers to various chrome://*/*/*.png's (for example, chrome://branding/content/icon16.png, chrome://browser/skin/places/bookmark.png and chrome://global/skin/icons/information-16.png). Even after the search for

  • My computer keeps asking me to restart to complete the installation of Firefox

    I just tried to upgrade to Firefox 8 and was asked to restart my computer. During its restart and try to run Firefox, I kept getting a message asking me to restart my computer. I've done several times and kept getting the same message.

  • How to remove StacsyModule?

    StacsyModule popup says start sorry has to close.make my pc slow please help it all started two days ago and don't know why? / ty hamlin

  • Images of Windows

    Before, when I went into my "pictures", the actual photo would appear in the gallery.  Somehow, I lost this 'apparition' and now I just show the "generic" icon  How can I get the views towards the actual photos?

  • How can I send my ideas to Microsoft

    Separated from this thread. What happens if I want to sell my idea to Microsoft? Is there a way to offer a development idea that they can use in the next major update and be paid for it?