![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to compile assert in Java?
In order to compile assert in Java, we simply set the boolean expression as false.
Let us see an example program −
Example
public class Example { public static void main(String[] args) { assert false; System.out.println("Compiled and executed successfully!!!"); } }
Output
Compiled and executed successfully!!!
Advertisements