Google App Engine is the one, which one can you help to set up Free online Java Compiler, But for that you need to have an account to proceed.

Few other places you can defnitely Check http://compilr.com/

If you have Applets, http://www.innovation.ch/java/java_compile.html

EDIT : As Stephen Suggests, Download JRE and JDE and use it from oracle website http://www.oracle.com/technetwork/java/javase/downloads/index.html

Answer from gmhk on Stack Overflow
🌐
W3Schools
w3schools.com β€Ί java β€Ί java_compiler.asp
Java Online Compiler (Editor / Interpreter)
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
🌐
OneCompiler
onecompiler.com β€Ί java
Java Online Compiler
OneCompiler's Java online editor supports stdin and users can give inputs to the programs using the STDIN textbox under the I/O tab. Using Scanner class in Java program, you can read the inputs. Following is a sample program that shows reading STDIN ( A string in this case ). import java.util.Scanner; class Input { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter your name: "); String inp = input.next(); System.out.println("Hello, " + inp); } }
🌐
W3Schools
w3schoolsua.github.io β€Ί java β€Ί java_compiler_en.html
Java Compiler. Lessons for beginners. W3Schools in English
Java Compiler. Editor online. To create and edit Java code, it is recommended to use IDE from JetBrains - IntelliJ IDEA. Lessons for beginners. W3Schools in English
🌐
OneCompiler
onecompiler.com β€Ί java β€Ί 3wy68zavj
myapplet.html - Java - OneCompiler
OneCompiler's Java online editor supports stdin and users can give inputs to the programs using the STDIN textbox under the I/O tab. Using Scanner class in Java program, you can read the inputs. Following is a sample program that shows reading STDIN ( A string in this case ). import java.util.Scanner; class Input { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter your name: "); String inp = input.next(); System.out.println("Hello, " + inp); } }
🌐
W3Schools
w3schools.com β€Ί java β€Ί tryjava.asp
W3Schools online JAVA editor
The W3Schools online code editor allows you to edit code and view the result in your browser
🌐
W3Schools
w3schools.com β€Ί java β€Ί java_getstarted.asp
Java Getting Started
This will compile your code. If there are no errors in the code, the command prompt will take you to the next line. Now, type "java Main" to run the file: ... Congratulations! You have written and executed your first Java program. ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com
🌐
W3Schools
w3schools.com β€Ί java β€Ί java_intro.asp
Introduction to Java
By the end of this tutorial, you will know how to write basic Java programs and apply your skills to real-life examples. You don't need any prior programming experience - just curiosity and practice! Follow the tutorial in order. Each chapter builds on the previous one. Get Started Β» ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com
Find elsewhere
🌐
Coderanch
coderanch.com β€Ί t β€Ί 328594 β€Ί java β€Ί Online-Java-Editor-Compiler
Online Java Editor/Compiler? (Java in General forum at Coderanch)
But there are many people who wants to learn Java or Compile/Execute java program through online website. This site will help for those > Want to learn Java Language through online (eg: students/programmers wants to go through w3schools.com to learn HTML where they dont need to install any software) > Want to learn Java in working places where they have restriction to download JDK.
🌐
W3Schools
w3schools.com β€Ί java
Java Tutorial
Check your understanding with a short quiz and see how well you know Java. ... Learn by examples! This tutorial supplements all explanations with clarifying examples. ... Note: This is an optional feature. You can study at W3Schools without creating an account.
🌐
Programiz
programiz.com β€Ί java-programming β€Ί online-compiler
Online Java Compiler - Programiz
// Online Java Compiler // Use this editor to write, compile and run your Java code online class Main { public static void main(String[] args) { System.out.println("Try programiz.pro"); } }
🌐
W3Schools
w3schools.com β€Ί java β€Ί java_syntax.asp
Java Syntax
Finally, remember that each Java statement must end with a semicolon (;). ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: sales@w3schools.com
🌐
W3Schools
w3schools.com β€Ί java β€Ί java_examples.asp
Java Examples
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
🌐
Quora
quora.com β€Ί How-can-I-add-an-online-compiler-to-my-site-like-the-ones-Codecademy-and-W3-schools-have
How to add an online compiler to my site like the ones Codecademy and W3 schools have - Quora
Answer (1 of 5): If you just want to have it on your website, you can partner with someone (e.g. http://www.programmr.com/) and have it embedded on your pages. If you want to build it yourself, following is how it works: 1. code typed in the page is transferred to the server normally and saved ...
🌐
Onecompiler
sandbox.onecompiler.com β€Ί java
Java Online Compiler
OneCompiler's Java online editor supports stdin and users can give inputs to the programs using the STDIN textbox under the I/O tab. Using Scanner class in Java program, you can read the inputs. Following is a sample program that shows reading STDIN ( A string in this case ). import java.util.Scanner; class Input { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter your name: "); String inp = input.next(); System.out.println("Hello, " + inp); } }
🌐
W3Schools
w3schoolsua.github.io β€Ί java β€Ί index_en.html
Java Language. Tutorial online. Examples. Lessons for beginners. W3Schools in English
Java Tutorial. Examples in Each Chapter. Java Exercises. Java Quiz. Learn by Examples. Java Reference. Download Java. Kickstart your career. Get certified by completing the JAVA course. Lessons for beginners. W3Schools in English
🌐
W3Schools
w3schools.com β€Ί java β€Ί java_exercises.asp
Java Exercises
Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Server Java Syllabus Java Study Plan Java Interview Q&A Java Certificate ... Tip: Sign in to track your progress. ... If you haven't already, sign up to become a W3Schooler, and get points for every exercise you complete.
🌐
OnlineGDB
onlinegdb.com β€Ί online_java_compiler
Online Java Compiler - online editor
/****************************************************************************** Online Java Compiler. Code, Compile, Run and Debug java program online. Write your code in this editor and press "Run" button to execute it.
Top answer
1 of 2
11

Functional interface

StringFunction is a functional interface. In other words it is an interface with a single abstract method.
An abstract method is a method without definition (without body).

Such interfaces can be implemented using a lambda expression. As it is done in your example.

So StringFunction exclaim = (s) -> s + "!" is an implementation of StringFunction and an instance of that implementation.

You can think of StringFunction exclaim = (s) -> s + "!" as a short version of following:

class ExclamationAppender implements StringFunction {
    @Override
    public String run(String s) {
        return s + "!";
    }
}

StringFunction exclaim = new ExclamationAppender();
2 of 2
5

The other Answers are correct about your StringFunction being a functional interface because it defines only a single abstract method. You later implement that functional interface by way of a lambda. (See tutorial by Oracle.) I’ll add one more thought.

java.lang.FunctionalInterface

If you were intending for StringFunction to be a functional interface, you can communicate that intent by annotating with FunctionalInterface.

@FunctionalInterface          //  (a) Communicates your intent. (b) Protects against later adding more methods. 
interface StringFunction {
  String run(String str);
}

Besides communicating intent, this annotation protects you in the future. If a programmer later adds another method to your interface, the compiler reports an error. The error explains how the additional method violates the contract promised by that annotation.

However, note that use of the FunctionalInterface annotation is optional. Your code so demonstrates. To quote the Javadoc:

… the compiler will treat any interface meeting the definition of a functional interface as a functional interface regardless of whether or not a FunctionalInterface annotation is present on the interface declaration.

While technically optional, I do recommend using this annotation.

For a complete definition of a functional interface, see this page of the Java Language Specification.

🌐
Codiva
codiva.io
Superfast Online Java Compiler, Editer and IDE - Codiva.io - Compile and Run Java Online
Codiva is an online compiler and IDE for C, C++ and Java. Online compiler. No installation needed ... We have been using Codiva.io for the bulk of this semester. It is our first foray into online IDE's and I have investigated each one at length. Codiva.io provides the best balance on speed ...