[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-423014-105":59,"doc-detail-423014-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","the-java-language-cheat-sheet-quick-reference","THE JAVA LANGUAGE CHEAT SHEET - quick reference","","Java language cheat sheet summarizing core syntax essentials for building programs. Covers primitive types, literals, operators (assignment, arithmetic, unary, boolean, bitwise, ternary), casting and common conversions, console input/output with Scanner, numeric utilities, extensive String methods, and essential Math functions. Includes control flow (if/else, while, for, do-while), array creation and traversal, method definitions with arguments and return rules, class/object fundamentals, constructors, static/instance fields, polymorphism via extends and abstract classes, interface implementation, and basic generics usage.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/the-java-language-cheat-sheet-quick-reference/423014/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/the-java-language-cheat-sheet-quick-reference/423014.png","ImageObject",300,407,{"name":92,"@type":93},"awa","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-21","2026-09-28",true,{"@type":102,"interactionType":103,"userInteractionCount":52},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are Java’s primitive types and how do they differ (numeric, boolean, char)?","Question",{"text":112,"@type":113},"Primitive types include integer types (byte, short, int, long), floating types (float, double), boolean, and char (Unicode). Each type has a distinct storage size and usage pattern.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which operators does the cheat sheet list for Java, and what categories are they in?",{"text":117,"@type":113},"It lists assignment (=), binary arithmetic (+ - * / %), unary operators (+ - ++ --), boolean operators (!, == != > >= \u003C \u003C=, && ||), bitwise operators (~ & ^ | \u003C\u003C >> >>>), and the ternary operator (condition ? trueVal : falseVal).",{"name":119,"@type":110,"acceptedAnswer":120},"How are arrays, loops, and methods structured according to the cheat sheet?",{"text":121,"@type":113},"Arrays are declared with explicit sizes or initializers, including multi-dimensional and ragged arrays. Loops include while, for(INIT; BOOL; UPDATE), do-while, and for-each; methods specify argument types and return rules, while non-void methods must return before ending.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},423014,1790948751,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":52,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":14,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":143,"read_time":24},3985747858093,"https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","THE JAVA LANGUAGE CHEAT SHEET  \nPrimitive Types:  \nINTEGER: byte (8bit),short(16bit),int(32bit), long(64bit),DECIM:float(32bit),double(64bit)  \n,OTHER: boolean (1bit) , char (Unicode)  \nHEX: 0x1AF,BINARY: 0b00101,LONG:8888888888888L CHAR EXAMPLES: ‘a’,’\\n’,’\\t’,’\\’’,’\\\\’,’\\”’Primitive Operators  \nAssignment Operator: = (ex: int a=5,b=3; ) Binary Operators (two arguments) : + - * / %  \nUnary Operators: + - ++ --  \nBoolean Not Operator (Unary) : !  \nBoolean Binary: == != > >= \u003C \u003C=  \nBoolean Binary Only: && ||  \nBitwise Operators: ~ & ^ | \u003C\u003C >> >>>  \nTernary Operator: bool?valtrue:valfalse; Casting, Conversion  \nint x = (int)5 .5; //works for numeric typesint x = Integer.parseInt(“123”);  \nfloat y = Float.parseFloat(“1 .5”);  \nint x = Integer.parseInt(“7A”,16); //fromHex String hex = Integer.toString(99,16);//toHex //Previous lines work w/ binary, other bases  \njava.util.Scanner, input, output  \nScanner sc = new Scanner([System.in](System.in) );  \nint i = sc.nextInt(); //stops at whitespace String line = sc.nextLine(); //whole line System.out.println(“bla”); //stdout  \nSystem.err.print(“bla”); //stderr,no newline  \njava.lang.Number types  \nInteger x = 5; double y = x.doubleValue(); double y = (double)x.intValue();  \n//Many other methods for Long, Double, etc  \njava.lang.String Methods  \n//Operator +, e.g. “fat”+”cat” -> “fatcat”boolean equals(String other); int length();  \nchar charAt(int i);  \nString substring(int i, int j); //j not incl boolean contains(String sub);  \nboolean startsWith(String pre);  \nboolean endsWith(String post); int indexOf(String p); //-1 if not found int indexOf(String p, int i); //start at iint compareTo(String t);  \n//“a”.compareTo(“b”) -> -1  \nString replaceAll(String str, String find); String[] split(String delim);  \nStringBuffer, StringBuilder  \nStringBuffer is synchronized StringBuilder (Use StringBuilder unless multithreaded) Use the .apend( xyz ) methods to concat toString() converts back to String  \njava.lang.Math  \nMath .abs(NUM),Math.ceil(NUM),Math.floor(NUM),Math.log(NUM),Math.max(A,B),Math.min(C,D), Math.pow(A,B),Math.round(A),Math.random ()  \nIF STATEMENTS :  \nif( boolean_value ) { STATEMENTS } else if( bool ) { STATEMENTS } else if(   etc ) { STATEMENTS }  \nelse { STATEMENTS }  \n//curly brackets optional if one line  \nLOOPS :  \nwhile( bool ) { STATEMENTS } for(INIT;BOOL;UPDATE) { STATEMENTS }//1INIT 2BOOL 3STATEMENTS 4UPDATE 5->Step2 do{ STATEMENTS }while( bool );  \n//do loops run at least once before checking break; //ends enclosing loop (exit loop) continue; //jumps to bottom of loop  \nARRAYS :  \nint[] x = new int[10]; //ten zerosint[][] x = new int[5][5]; //5 by 5 matrix int[] x = {1,2,3,4};  \nx.length; //int expression length of array int[][] x = {{1,2},{3,4,5}}; //ragged array String[] y = new String[10]; //10 nulls //Note that object types are null by default  \n//loop through array:  \nfor(int i=0;i\u003Carrayname.length;i++) {//use arrayname[i];  \n}  \n//for-each loop through array  \nint[] x = {10,20,30,40}; for(int v : x) {  \n//v cycles between 10,20,30,40}  \n//Loop through ragged arrays:  \nfor(int i=0;i\u003Cx.length;i++) for(int j=0;j\u003Cx[i] .length;j++) {  \n//CODE HERE}  \n//Note, multi-dim arrays can have nulls  \n//in many places, especially object arrays: Integer[][] x = {{1,2},{3,null},null};  \nFUNCTIONS / METHODS :  \nStatic Declarations:  \npublic static int functionname( … )  \nprivate static double functionname( … ) static void functionname( … )  \nInstance Declarations:  \npublic void functionname( … )  \nprivate int functionname( … )  \nArguments, Return Statement:  \nint myfunc(int arg0, String arg1) { return 5; //type matches int myfunc  \n}  \n//Non-void methods must return before ending //Recursive functions should have an if //statement base-case that returns at once  \nCLASS/OBJECT TYPES :  \nINSTANTIATION :  \npublic class Ball {//only 1 public per file  \n//STATIC FIELDS/METHODS  \nprivate static int numBalls = 0;  \npublic static int getNumBalls() {  \nreturn numBalls;}  \npublic static final in","cbCaio0f9Xjd5lbx","https://ap.wps.com/l/cbCaio0f9Xjd5lbx","pdf",163431,"English","# Primitive Types\n## Primitive Operators and Expressions\n# Operators, Casting, and Conversions\n## Scanner Input and Output\n# String and Number Utilities\n## Math Functions\n# Control Flow\n## Loops\n# Arrays\n## Looping Through Arrays\n# Functions and Methods\n## Class and Object Types\n# Polymorphism and Interfaces\n## Generics","[{\"question\":\"What are Java’s primitive types and how do they differ (numeric, boolean, char)?\",\"answer\":\"Primitive types include integer types (byte, short, int, long), floating types (float, double), boolean, and char (Unicode). Each type has a distinct storage size and usage pattern.\"},{\"question\":\"Which operators does the cheat sheet list for Java, and what categories are they in?\",\"answer\":\"It lists assignment (=), binary arithmetic (+ - * / %), unary operators (+ - ++ --), boolean operators (!, == != \\u003e \\u003e= \\u003c \\u003c=, \\u0026\\u0026 ||), bitwise operators (~ \\u0026 ^ | \\u003c\\u003c \\u003e\\u003e \\u003e\\u003e\\u003e), and the ternary operator (condition ? trueVal : falseVal).\"},{\"question\":\"How are arrays, loops, and methods structured according to the cheat sheet?\",\"answer\":\"Arrays are declared with explicit sizes or initializers, including multi-dimensional and ragged arrays. Loops include while, for(INIT; BOOL; UPDATE), do-while, and for-each; methods specify argument types and return rules, while non-void methods must return before ending.\"}]","THE JAVA LANGUAGE CHEAT SHEET - quick reference | PDF",1790629749]