Menu

Diamond operator is not supported in source

While running a Java project with IntelliJ, we might face an error stating "diamond operator is not supported in -source 1.5", which means we are trying to run the project on a lower version of Java which is developed on a higher version.

Error statement 

java: diamond operator is not supported in -source 1.5

  (use -source 7 or higher to enable diamond operator)


Solution/Apply the following fix

Go to File option from menu >> Project Structure >> Project Settings >> Modules. Here in Module, we need to use the higher version of language level under the Source tab 


Hope this helps you!



Cast an object to Integer in Java

We could cast an object that have integer value into an integer using below Java code.

int value = Integer.parseInt(object.toString());

Ishq Ki Dastaan Sari Mehfil Sune | Taj Mahal | Naqsh Lyallpuri and Syed Gulrez

dil ke armano ki shamma jalae baithe hain
unki tasveer ko dil main chupaye baithe hain

ishq ki dastaan sari mehfil sune
ishq dil main chupana jaroori nahin
ishq ejsaas hain dil ki awaaz hain
sun le sara zamana jaroori nahin

ishq dil main rahega toh ghut jayega
yu hi tadpega machlega mit jayega
ishq ko yu mitana jaroori nahin

ishq mitna nahin hain mehakta hai yeh
ishq shola hain dil main dehakta hain
sabka daman jalana jaroori nahin

ishq elaan hain ishq toofan hain
tauba tauba na samjhe woh nadaan hain
aag dil main dabana jaroori nahin

ishq dil ke dhadakne ki pehchaan hain
ishq bebaat ho chahe badnaam hain
haale dil yu sunana jaroori nahin

ishq koi raaz nahin
ishq aawaz nahin
ishq khamosh nahin
ishq behosh nahin
ishq gumnam na ho
ishq badnaam na ho
ishq duniya ko dikha le
unki aankhon main chupa le
khul ke jeene main maja hain
ada hain nasha hain