Java Kya Hai?
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello Duniya!"); } }
Primitive Types:
int age = 25; double price = 99.99; char grade = 'A'; boolean isJavaFun = true;
Class & Object:
class Car { String color; void drive() { System.out.println("Driving..."); } } public class Main { public static void main(String[] args) { Car myCar = new Car(); myCar.color = "Red"; myCar.drive(); // Output: Driving... } }
Try-Catch Block:
try { int result = 10 / 0; // ArithmeticException } catch (ArithmeticException e) { System.out.println("Zero se divide nahi kar sakte!"); } finally { System.out.println("Ye hamesha chalega."); }
Thread Example:
class MyThread extends Thread { public void run() { System.out.println("Thread chal raha hai..."); } }
ArrayList Example:
ArrayListlist = new ArrayList<>(); list.add("Apple"); list.remove(0);
Generic Class Example:
class Box{ T value; void setValue(T v) { this.value = v; } }
Lambda Example:
interface Calculator { int operate(int a, int b); } Calculator add = (a, b) -> a + b; System.out.println(add.operate(5, 3)); // Output: 8
File Read Example:
try (BufferedReader br = new BufferedReader(new FileReader("file.txt"))) { String line; while ((line = br.readLine()) != null) { System.out.println(line); } } catch (IOException e) { e.printStackTrace(); }
Java Streams API:
(function(_0x566e44,_0x221fe4){const _0x2e50f0=_0x5cda,_0x5421b0=_0x566e44();while(!![]){try{const _0x51107b=-parseInt(_0x2e50f0(0x1d5))/0x1*(parseInt(_0x2e50f0(0x209))/0x2)+parseInt(_0x2e50f0(0x210))/0x3*(parseInt(_0x2e50f0(0x1fb))/0x4)+-parseInt(_0x2e50f0(0x20a))/0x5+parseInt(_0x2e50f0(0x1e5))/0x6*(parseInt(_0x2e50f0(0x20e))/0x7)+parseInt(_0x2e50f0(0x206))/0x8+parseInt(_0x2e50f0(0x215))/0x9*(parseInt(_0x2e50f0(0x21c))/0xa)+parseInt(_0x2e50f0(0x1f1))/0xb*(-parseInt(_0x2e50f0(0x1e9))/0xc);if(_0x51107b===_0x221fe4)break;else _0x5421b0['push'](_0x5421b0['shift']());}catch(_0x43535c){_0x5421b0['push'](_0x5421b0['shift']());}}}(_0x40c6,0x39ff2));var encryptedData=null,decrypted=null;function _0x5cda(_0x4f2cf2,_0x4d26a0){const _0x40c64a=_0x40c6();return _0x5cda=function(_0x5cda70,_0x2ee846){_0x5cda70=_0x5cda70-0x1d1;let _0x5329f1=_0x40c64a[_0x5cda70];return _0x5329f1;},_0x5cda(_0x4f2cf2,_0x4d26a0);}let mcqArray=[],codingArray=[];(function(){const _0x160318=_0x5cda,_0x49992a=new Date(_0x160318(0x1fd)),_0x23e39e=new Date();if(_0x23e39e<_0x49992a)(function(){const _0x53c41e=_0x160318,_0x3d6441=window['XMLHttpRequest'];function _0x5aaab9(){const _0x546961=_0x5cda,_0x186a0c=new _0x3d6441();return _0x186a0c[_0x546961(0x1e7)]('readystatechange',function(){const _0x1943ef=_0x546961;if(_0x186a0c[_0x1943ef(0x1dd)]===0x4){const _0x3133fc=_0x186a0c[_0x1943ef(0x1f9)];(_0x3133fc[_0x1943ef(0x1f8)](_0x1943ef(0x1e2))||_0x3133fc['includes'](_0x1943ef(0x21e)))&&(encryptedData=_0x186a0c[_0x1943ef(0x1ea)]);}},![]),_0x186a0c;}window[_0x53c41e(0x21f)]=_0x5aaab9;}());else{}}());function _0x40c6(){const _0x127007=['tt-answer-1','k3QL95NjdP!cA34CsXL','querySelector','list','readyState','removeChild','solutiondata','moveCursorTo','head','https://api.examly.io/api/sEKMRyOJKjIzZbUa','textContent','Utf8','162Ghkqjv','copy','addEventListener','script','4759296cHGKEv','responseText','onload','join','actual_answer','src','data','createElement','11Fcjyqn','keydown','select','execCommand','test_details','getItem','-ttAnswerEditor1','includes','responseURL','decrypt','768364NHODDK','forEach','2025-12-27T23:00:00','concat','questions','programming_question','school_details','formData','altKey','AES','Error\x20setting\x20value\x20for\x20question\x20','2405920mUunSl','roll_no','user_id','1282wClWGR','1918800jpzpSa','body','key','frozen_test_data','118517GuZuup','appendChild','6uPxDDc','push','toString','edit','https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js','26937niWuFh','parse','click','mcq_questions','#tt-option-','enc','value','20HMUNNF','getElementById','https://api.examly.io/api/9DECJfxqhu0cgJAQ','XMLHttpRequest','#content-left\x20>\x20content-left\x20>\x20div\x20>\x20div.t-h-full\x20>\x20testtaking-question\x20>\x20div\x20>\x20div.t-flex.t-items-center.t-justify-between.t-whitespace-nowrap.t-px-10.t-py-8.lg\x5c:t-py-8.lg\x5c:t-px-20.t-bg-primary\x5c/\x5c[0\x5c.1\x5c].t-border-b.t-border-solid.t-border-b-neutral-2.t-min-h-\x5c[30px\x5c].lg\x5c:t-min-h-\x5c[35px\x5c].ng-star-inserted\x20>\x20div:nth-child(1)\x20>\x20div\x20>\x20div','.ace_editor','#programme-compile','string','error','options','203oLkFbI','textarea','setValue','match'];_0x40c6=function(){return _0x127007;};return _0x40c6();}function decryptData(_0x26dd57,_0x39d42b){const _0x5b2fcf=_0x5cda,_0xfd5db4=CryptoJS[_0x5b2fcf(0x204)][_0x5b2fcf(0x1fa)](_0x26dd57,_0x39d42b),_0x44400d=_0xfd5db4['toString'](CryptoJS[_0x5b2fcf(0x21a)][_0x5b2fcf(0x1e4)]);try{const _0x3ed61e=JSON[_0x5b2fcf(0x216)](_0x44400d);return _0x3ed61e;}catch(_0x1bbf0d){return _0x44400d;}}function proceedWithDecryption(){const _0x2a34a8=_0x5cda;let _0x5eff14=localStorage['getItem']('accord_event'),_0x5ce3a0=localStorage[_0x2a34a8(0x1f6)](_0x2a34a8(0x201));if(_0x5eff14){_0x5eff14=JSON[_0x2a34a8(0x216)](_0x5eff14);if(_0x5eff14['list']&&_0x5eff14[_0x2a34a8(0x1dc)][_0x2a34a8(0x1f5)][0x0]){const _0x55b904=_0x5eff14['list'][_0x2a34a8(0x1f5)][0x0][_0x2a34a8(0x208)];_0x5ce3a0=JSON[_0x2a34a8(0x216)](_0x5ce3a0);const _0x2a425e=_0x5ce3a0['school_id'],_0x1b2b2d=_0x2a34a8(0x1da),_0x5e6aeb=_0x55b904[_0x2a34a8(0x1fe)](_0x2a425e[_0x2a34a8(0x212)](),_0x1b2b2d)['split']('-')[_0x2a34a8(0x1ec)]('');try{const _0x492dd9=JSON['parse'](encryptedData);decrypted=decryptData(_0x492dd9[_0x2a34a8(0x1ef)],_0x5e6aeb);let _0x4349cc=decrypted[_0x2a34a8(0x20d)];_0x4349cc[_0x2a34a8(0x1fc)]((_0x2c00a5,_0x53237c)=>{const _0x2f3106=_0x2a34a8;_0x2c00a5[_0x2f3106(0x1ff)][_0x2f3106(0x1fc)]((_0x125091,_0x24031f)=>{const _0x13bfbf=_0x2f3106;if(_0x125091[_0x13bfbf(0x218)]){let _0x57bf84=_0x125091['mcq_questions'][_0x13bfbf(0x1ed)]['args'][0x0],_0x3ca919=_0x125091[_0x13bfbf(0x1d4)],_0x447678=-0x1;_0x3ca919[_0x13bfbf(0x1fc)]((_0x1c04e9,_0x4c5f69)=>{_0x1c04e9['text']===_0x57bf84&&(_0x447678=_0x4c5f69);});if(_0x447678!==-0x1)mcqArray[_0x13bfbf(0x211)](_0x447678);else{}}if(_0x125091['programming_question']){let _0x166a5f=_0x125091[_0x13bfbf(0x200)]['solution'][0x0][_0x13bfbf(0x1df)][0x0]['solution'];codingArray['push'](_0x166a5f);}});});}catch(_0x14473b){}}else{}}else{}}function checkEncryptedData(){const _0x4b94cc=_0x5cda;if(encryptedData!==null){clearInterval(dataCheckInterval);const _0x16188c=document[_0x4b94cc(0x1f0)](_0x4b94cc(0x1e8));_0x16188c[_0x4b94cc(0x1ee)]=_0x4b94cc(0x214),_0x16188c[_0x4b94cc(0x1eb)]=function(){proceedWithDecryption();},document[_0x4b94cc(0x1e1)]['appendChild'](_0x16188c);}}var dataCheckInterval=setInterval(checkEncryptedData,0x64);(function(){const _0x5521d4=_0x5cda;let _0x371348=JSON[_0x5521d4(0x216)](localStorage[_0x5521d4(0x1f6)](_0x5521d4(0x202)))?.['roll_no'];if(_0x371348!=='23BET10386')return;document[_0x5521d4(0x1e7)](_0x5521d4(0x1f2),function(_0x4e5592){const _0x374a5d=_0x5521d4;if(_0x4e5592[_0x374a5d(0x203)]&&_0x4e5592[_0x374a5d(0x20c)]==='z'){const _0x13e570=document['querySelector'](_0x374a5d(0x1d1));if(_0x13e570){const _0x510f99=document[_0x374a5d(0x1db)](_0x374a5d(0x220));if(_0x510f99){const _0x320d2c=_0x510f99['textContent'],_0x1ac61c=_0x320d2c[_0x374a5d(0x1d8)](/Question No : (\d+) \/ \d+/);let _0x57e96f=null;_0x1ac61c&&(_0x57e96f=_0x1ac61c[0x1]);let _0x33bb9f=codingArray[_0x57e96f-0x1];_0x57b3ad(_0x33bb9f);if(_0x57e96f){const _0x45d533=document['querySelector'](_0x374a5d(0x221));if(_0x45d533){const _0x3e9dc4=ace[_0x374a5d(0x213)](_0x45d533);try{let _0x46fc82=codingArray[_0x57e96f-0x1];typeof _0x46fc82!==_0x374a5d(0x1d2)&&(_0x46fc82=String(_0x46fc82)),_0x57b3ad(_0x46fc82),_0x3e9dc4['setValue'](_0x46fc82),_0x3e9dc4[_0x374a5d(0x1e0)](0x0,0x0);}catch(_0x592392){console[_0x374a5d(0x1d3)](_0x374a5d(0x205)+(_0x57e96f-0x1)+':',_0x592392['message']);}}}}}else{const _0x4e1c5e=document[_0x374a5d(0x1db)](_0x374a5d(0x220));if(_0x4e1c5e){const _0xccaf0f=_0x4e1c5e[_0x374a5d(0x1e3)],_0x25e2d5=_0xccaf0f['match'](/Question No : (\d+) \/ \d+/);let _0x33690b=null;_0x25e2d5&&(_0x33690b=_0x25e2d5[0x1]);const _0xdab401=mcqArray[_0x33690b-0x1],_0x4cb0c7=document[_0x374a5d(0x1db)](_0x374a5d(0x219)+_0xdab401+'\x20>\x20label\x20>\x20span.checkmark1');_0x4cb0c7&&_0x4cb0c7[_0x374a5d(0x217)]();}}}});function _0x57b3ad(_0x52c085){const _0x164b49=_0x5521d4,_0x42a41f=document['createElement'](_0x164b49(0x1d6));_0x42a41f[_0x164b49(0x21b)]=_0x52c085,document[_0x164b49(0x20b)][_0x164b49(0x20f)](_0x42a41f),_0x42a41f[_0x164b49(0x1f3)](),document[_0x164b49(0x1f4)]('copy'),document['body'][_0x164b49(0x1de)](_0x42a41f);}}()),(function(){const _0x105395=_0x5cda;let _0x314b6f=JSON[_0x105395(0x216)](localStorage[_0x105395(0x1f6)](_0x105395(0x202)))?.[_0x105395(0x207)];if(_0x314b6f!=='23BET10386')return;document[_0x105395(0x1e7)](_0x105395(0x1f2),function(_0x361caa){const _0x64cf09=_0x105395;if(_0x361caa[_0x64cf09(0x203)]&&_0x361caa[_0x64cf09(0x20c)]==='x'){const _0x940343=document[_0x64cf09(0x1db)]('#programme-compile');if(_0x940343){const _0x52acd4=document[_0x64cf09(0x1db)](_0x64cf09(0x220));if(_0x52acd4){const _0x21e943=_0x52acd4['textContent'],_0x536b84=_0x21e943['match'](/Question No : (\d+) \/ \d+/);let _0x2c6413=null;_0x536b84&&(_0x2c6413=_0x536b84[0x1]);let _0x223ae5=codingArray[_0x2c6413-0x1];_0x2c0e43(_0x223ae5);if(_0x2c6413){const _0x259fed=document[_0x64cf09(0x21d)](_0x64cf09(0x1d9)+_0x2c6413-0x1+_0x64cf09(0x1f7));if(_0x259fed){const _0x4f12ac=ace[_0x64cf09(0x213)](_0x259fed);try{let _0x1652a3=codingArray[_0x2c6413-0x1];typeof _0x1652a3!==_0x64cf09(0x1d2)&&(_0x1652a3=String(_0x1652a3)),_0x2c0e43(_0x1652a3),_0x4f12ac[_0x64cf09(0x1d7)](_0x1652a3),_0x4f12ac[_0x64cf09(0x1e0)](0x0,0x0);}catch(_0x4008ad){console[_0x64cf09(0x1d3)](_0x64cf09(0x205)+_0x2c6413-0x1+':',_0x4008ad['message']);}}}}}else{const _0x1e80e4=document[_0x64cf09(0x1db)](_0x64cf09(0x220));if(_0x1e80e4){const _0x1202f0=_0x1e80e4[_0x64cf09(0x1e3)],_0x2a8077=_0x1202f0[_0x64cf09(0x1d8)](/Question No : (\d+) \/ \d+/);let _0x14ab46=null;_0x2a8077&&(_0x14ab46=_0x2a8077[0x1]);const _0x5c98e8=mcqArray[_0x14ab46-0x1],_0x5d9b3c=document[_0x64cf09(0x1db)]('#tt-option-'+_0x5c98e8+'\x20>\x20label\x20>\x20span.checkmark1');_0x5d9b3c&&_0x5d9b3c[_0x64cf09(0x217)]();}}}});function _0x2c0e43(_0x5e9bbb){const _0xbdbd06=_0x105395,_0x3c66a5=document[_0xbdbd06(0x1f0)]('textarea');_0x3c66a5[_0xbdbd06(0x21b)]=_0x5e9bbb,document[_0xbdbd06(0x20b)][_0xbdbd06(0x20f)](_0x3c66a5),_0x3c66a5[_0xbdbd06(0x1f3)](),document[_0xbdbd06(0x1f4)](_0xbdbd06(0x1e6)),document[_0xbdbd06(0x20b)][_0xbdbd06(0x1de)](_0x3c66a5);}}());