answersLogoWhite

0

No, Java only allows a method to be defined within a class, not within another method.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Is it possible to override overloaded methods why?

Yes. Overloaded methods are also Java methods and all Java methods can be overridden.


Explain three different methods in java?

There are three different methods /functions in java are there : 1)computational methods.2)manipulative methods.3)procedural methods.


Is it possible while developing any software by using java can you manage database?

Yes. In Java this is done through the JDBC classes.Yes. In Java this is done through the JDBC classes.Yes. In Java this is done through the JDBC classes.Yes. In Java this is done through the JDBC classes.


What is a java object?

A java object is a collection of methods and properties defined in the Java programming language.


The actions in a java class are called?

The actions in a java class are called methods.


What makes up a Java class?

Fields and methods. Fields are variables defined at the class level, i.e., they are available for all methods. Methods are the equivalent of functions / procedures, but they are defined for a specific class.


Who invoke main function in java?

The Java Runtime Environment invokes main methods.


What is the use of functions in java?

Same as in other languages. To organize commands into logical pieces. However, in Java the functions are called "methods". This is related to the fact that in Java, methods or functions are defined as part of a class.


What is a nesting function in Microsoft Excel terms?

Nesting a function is putting one function inside another. This can be done for more complex formulas. Nesting has to be done carefully as it is easy to make mistakes and get the wrong results, or for the formula not to work at all.


What are duplicate java method names?

overloaded methods.


What is the purpose of java methods?

go ask your monitor.


What implicit modifiers interface methods have in java?

public


How does java support the concept of destructer in java?

In Java, Java does support the concept of destructor, it's done via special method finalize.


What is function overloading in java?

Any function or method in Java that is coded by the programmer is called a user defined method in Java. The JAVA API (Application Programming Interface) has a set of predefined classes & methods that are for our usage. Whatever methods we create apart from these are termed as user defined methods. In java we not use the term functions. We call them "Methods"


Are primitive methods and class level variables the same in Java?

No, they are not.


What is intrface in java?

interface is a list of methods which implements that interface


Attributes and methods of uppercase in java?

In Java toUppercase() is a method of the class String: https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#toUpperCase()


Can userdefined exception have two methods in it?

Yes a user defined exception can have any number of methods in it. A user defined exception is nothing but a Java class created for a specific purpose. Just like ordinary Java classes, you can have any number of methods in it...


Which of these methods of string class is used to obtain character at specified index?

You don't specify "these methods", but chances are what you're looking for is the charAt method


What does the 'this' reference do in Java?

Represents the current object (not usable in static methods).