Java Compiler compileClasses() method

The compileClasses(String string) method of the Java Compiler class is used to compile all classes whose name matches the specified string.

Syntax

Parameters

String - It is the name of classes to compile.

Return

This method returns a Boolean value true if compilation succeeds. Otherwise returns false.

Example 1

Test it Now

Output:

class CompilerCompileClassExample1
class CompilerExamples
Value returned by method is : false




Latest Courses