Printing the value of a variable in SQL Developer
SQL Developer seems to only output the DBMS_OUTPUT text when you have explicitly turned on the DBMS_OUTPUT window pane.
Go to (Menu) VIEW -> Dbms_output to invoke the pane.
Click on the Green Plus sign to enable output for your connection and then run the code.
EDIT: Don't forget to set the buffer size according to the amount of output you are expecting.
You need to turn on dbms_output. In Oracle SQL Developer:
- Show the DBMS Output window (View->DBMS Output).
- Press the "+" button at the top of the Dbms Output window and then select an open database connection in the dialog that opens.
In SQL*Plus:
SET SERVEROUTPUT ON