online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
//java program to understand the concept of composition class Library { //library can have no of books //book does not exist without library // so there is strong relationship it is called composition Book b; Library(String bookname) { b = new Book(bookname); b.getBookInfo(); } } class Book { String bookname; Book(String bookname) { this.bookname = bookname; } public void getBookInfo() { System.out.println(bookname); } } public class Main { public static void main(String args[]) { Library l = new Library("Hemlet"); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue