answersLogoWhite

0


Best Answer

No. Variables declared inside a scriptlet are like method local variables which are not accessible outside the scriptlet/method.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can variable declared in one scriplet access in another scriplet?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the key word used to access the variable declared as global variable in another file?

r+ is the keyword


Which is the keyword used to access the variable declared as global variable in another file?

To be able to access a variable declared in one file/class from another file/class you need to declare that variable as "public". Doing this is a very bad coding practice because exposing a variable of a class to be available publicly to other classes is totally against the Java object oriented concepts of Encapsulation and Data hiding. So, preferably you shouldn't be doing this. However, a better way to do this is, declare the variable as private and have public accessor methods through which you can access this variable. This will ensure that your data is protected even if it is available outside the class


What type of reference is C19?

A reference variable is used to refer to or give access to an object. A reference variable is declared to be of a particular type and that type can not be altered.


What does In public mean?

The keyword public is an access specifier. A variable or a method that is declared public is publicly accessible to any member of the project. Any class or method can freely access other public methods and variables of another class.


What is Global variables in vb6?

Global variables are accessible through your project. Different classes, modules, and interfaces can access a variable if it is global. A Global Variable can simply be declared by putting the word Public in front of the variable. Here is an example. Public V As String Now anything in your whole entire project can access the variable V.


Describe about storage allocation and scope of global extern static local and register variables?

Global Varible: The variable which is declared as "Global" one : having the preveleges to use and access that variable in any class and object( means any where in the program) just like PUBLIC keyword in OOPS concepts. Static Variable : If we declare a variable as Static , then it wont have the permission to access that variable through out the program and u have to use it inside the class or object which u declared itself. All the Best Annapurna


Difference between register variable and automatic variables?

Register variables are stored in register of microprocessor/micro-controller. The read/write access to register variable is the fastest because CPU never need any memory BUS operation to access these variable. Auto variable are stored in stack thus access are much slower. Auto variable can be converted to register by using register keyword before it. It has platform specific limitation. Register variable will work only if free registers are available to hold the variable for a function scope. In case of Microprocessor or microcontrollers having very less number of general purpose registers will never take register variable even if we declare it as register.


How do you access global variable from within the main function when the local variable is of the same name?

When you acess a global variable inside main function you must use the same name, because the variable declared as global can be accessed by any function/procedure on the class where it was defined.


what type of variable is visible to every module and the entire program?

If you are talking about a class in Java, a variable encapsulated by a class is called an instance variable b/c everytime you create an object with that class, each object has its own set of the variables declared.


What is the difference between global variable and extern variable?

Global variables are non-local variables. That is, variables that are not defined in a function or class. They are globally accessible to all code in the same translation unit. External variables are global variables that have external linkage; they are accessible across translation units.


How the jvm is able to access your class even you declare it using default access specifier but the same class is not accessed from other class which is declared in another package?

The JVM knows about all of your classes, no matter what package they are in or what access specifier you declared them with. The access specifier is only used to limit access from other classes.


What is reference data types in java?

A reference variable is used to refer to (or access) an object. A reference variable is declared to be of a specific type and that type can never be changed. Ex: ArrayList lst = new ArrayList(); The above line creates a reference variable lst which refers to an ArrayList object