\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{KETHEO} \pdfinfo{ /Title (ap-csa-java-unit-1.pdf) /Creator (Cheatography) /Author (KETHEO) /Subject (AP CSA Java Unit 1 Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{03565C} \definecolor{LightBackground}{HTML}{F7F9F9} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{AP CSA Java Unit 1 Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{KETHEO} via \textcolor{DarkBackground}{\uline{cheatography.com/139637/cs/29497/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}KETHEO \\ \uline{cheatography.com/ketheo} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 26th October, 2021.\\ Updated 26th October, 2021.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{INPUT \& OUTPUT}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{INPUT}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{To use Scanner, import Scanner library:\{\{nl\}\}\{\{ac\}\}{\bf{import java.Object.Scanner}}} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Scanner scan = new Scanner(System.in);} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{name = scan.nextInt();} \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{name = scan.nextLine();} \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{name = scan.nextDouble();} \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{OUTPUT}}} \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{System.out.print ( "Hello" );} \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{System.out.println ( "Hello" ); // New line.} \tn % Row Count 11 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{COMMENTS}}} \tn % Row Count 12 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{// A single line comment.} \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{/*\{\{nl\}\}* Multiple\{\{nl\}\}* line comments.\{\{nl\}\}*/} \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{JAVADOC}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{package-info.java //Need to generate.} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{/**\{\{nl\}\}* Javadoc comments generate a HTML file.\{\{nl\}\}* @author\{\{nl\}\}* @version\{\{nl\}\}*/} \tn % Row Count 3 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.04057 cm} x{2.93643 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{VARIABLES}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{PRIMITIVE DATA TYPES}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}int value = {\bf{null}}; //Doesn't compile.} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} byte & 8 bits \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} short & 16 bits \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} int & 32 bits \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} long & 64 bits \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} char & Textual: (16 bits) \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} boolean & Logical: true/false \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} float (decimal) & Floats 15 places (32 bits) \tn % Row Count 10 (+ 2) % Row 9 \SetRowColor{white} double (decimal)\{\{bb\}\} & Floats 15 places (64 bits)\{\{bb\}\} \tn % Row Count 12 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{FINAL VARIABLES}}} \tn % Row Count 13 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}\{\{fa-arrow-circle-right\}\}Permanent Values} \tn % Row Count 14 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{final double PI = 3.14159265;} \tn % Row Count 15 (+ 1) % Row 13 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{final String LANGUAGE = "Java";} \tn % Row Count 16 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.23579 cm} x{1.51041 cm} x{1.8308 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{KEYWORDS}} \tn % Row 0 \SetRowColor{LightBackground} abstract & final/ly & public \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} assert & float & requires \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} boolean & for & return \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} break & goto & short \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} byte & if & static \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} case & implements & strictfp \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} catch & import & super \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} char & instanceof & switch \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} class & int & synchronized \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} continue & interface & this \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} const & long & throw/s \tn % Row Count 11 (+ 1) % Row 11 \SetRowColor{white} default & module & transient \tn % Row Count 12 (+ 1) % Row 12 \SetRowColor{LightBackground} do & native & true \tn % Row Count 13 (+ 1) % Row 13 \SetRowColor{white} double & new & try \tn % Row Count 14 (+ 1) % Row 14 \SetRowColor{LightBackground} else & null & var \tn % Row Count 15 (+ 1) % Row 15 \SetRowColor{white} enum & package & void \tn % Row Count 16 (+ 1) % Row 16 \SetRowColor{LightBackground} exports & private & volatile \tn % Row Count 17 (+ 1) % Row 17 \SetRowColor{white} extends & protected & while \tn % Row Count 18 (+ 1) % Row 18 \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{false} \tn % Row Count 19 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{STRINGS}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{REFERENCE DATA TYPE}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{String name = \{\{fa-quote-left\}\}Always within quotes\{\{fa-quote-right\}\};} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{String words = "123 have no value";} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{STRING CONCATENATION}}} \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\seqsplit{System.out.println("Hello} " + variable + "." );} \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{System.out.print (variable + " Hello World");} \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{CONCATENATION RULES}}} \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{number + number = number} \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{number + String = number + String} \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{String + number = String} \tn % Row Count 11 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{Above number changed to a String!}}} \tn % Row Count 12 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{String + (number) = String + number} \tn % Row Count 13 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}{\bf{Use ( ) to override String change.}}} \tn % Row Count 14 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.43873 cm} x{2.53827 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{CALCULATIONS}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{COMPOUND ASSIGNMENT OPERATORS}}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}Syntax to assign arithmetic operation result {\bf{back-into}} "assignment" variable.} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{+=}} & Add values \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} {\bf{-=}} & Minus values \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} {\bf{*=}} & Multiply values \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} {\bf{/=}} & Divide values \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} {\bf{\%=}} & Modulus (remainder) \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} {\bf{++}} & Adds one \tn % Row Count 9 (+ 1) % Row 8 \SetRowColor{LightBackground} {\bf{-{}-}} & Subtracts one \tn % Row Count 10 (+ 1) % Row 9 \SetRowColor{white} x = x + 1;\{\{nl\}\}x += 1;\{\{nl\}\}x++;\{\{bb\}\} & //adds one to x\{\{nl\}\}//adds one to x\{\{nl\}\}//adds one to x\{\{bb\}\} \tn % Row Count 14 (+ 4) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{MODULAR DIVISION (\%)}}} \tn % Row Count 15 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{REMAINDER}}} \tn % Row Count 16 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}Only works on integers!} \tn % Row Count 17 (+ 1) % Row 13 \SetRowColor{white} 7 {\bf{\%}} 2 =remainder 1 & 8 {\bf{\%}} 3 =remainder 2 \tn % Row Count 19 (+ 2) % Row 14 \SetRowColor{LightBackground} Find even numbers & x {\bf{\%}} 2 = remainder 0 \tn % Row Count 21 (+ 2) % Row 15 \SetRowColor{white} Find odd numbers\{\{bb\}\} & x {\bf{\%}} 2 = remainder 1\{\{bb\}\} \tn % Row Count 23 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{MINIMUM \& MAXIMUM}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}Integer.MIN\_VALUE \{\{fa-arrows-h\}\} Integer.MAX\_VALUE} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\{\{ac\}\}~2147483647 \{\{fa-arrows-h\}\} {\bf{-}}2147483648} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{NAMING CONVENTIONS}} \tn % Row 0 \SetRowColor{LightBackground} Package & {\bf{java}}, {\bf{lang}}, {\bf{shapes}}, etc...\{\{nl\}\}{\bf{package.name}}, {\bf{java.io}}, etc...\{\{nl\}\}{\bf{com.example.mypackage}}, etc...\{\{nl\}\}Lowercase letters.\{\{nl\}\}Separate words with dots (.)\{\{nl\}\}Companies: "reversed Internet domain" starts their package name. \tn % Row Count 9 (+ 9) % Row 1 \SetRowColor{white} Class & {\bf{Color}}, {\bf{Button}}, {\bf{Cats}}, etc...\{\{nl\}\}{\bf{CambridgeCitySchools}}, etc...\{\{nl\}\}NOUNS: Each word starts with an uppercase letter.\{\{fa-times-circle\}\}No acronyms. \tn % Row Count 15 (+ 6) % Row 2 \SetRowColor{LightBackground} Method & {\bf{main()}}, {\bf{print()}}, {\bf{equals()}}, etc...\{\{nl\}\}{\bf{newMethod()}}, {\bf{toString()}} etc...\{\{nl\}\}VERB: First word lowercase.\{\{nl\}\}Adding words: First letter uppercase. \tn % Row Count 21 (+ 6) % Row 3 \SetRowColor{white} Variable & {\bf{area}}, {\bf{name}}, {\bf{size}}, etc...\{\{nl\}\}{\bf{newTriangle}}, {\bf{rightSide}}, etc...\{\{nl\}\}IDENTIFIER: first word lowercase. \{\{nl\}\}Adding words; first letter uppercase.\{\{nl\}\}\{\{fa-times-circle\}\}No keywords.\{\{nl\}\}\{\{fa-times-circle\}\}No special characters to start.\{\{nl\}\}\{\{fa-times-circle\}\}Avoid one letter: x, y, z, etc. \tn % Row Count 32 (+ 11) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{x{1.29402 cm} x{3.68298 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{NAMING CONVENTIONS (cont)}} \tn % Row 4 \SetRowColor{LightBackground} Final Constant & {\bf{PI}}, {\bf{BLUE}}, {\bf{MATH}}, etc...\{\{nl\}\}{\bf{MAX\_PRIORITY}}, {\bf{CITY\_ZIP}}, etc...\{\{nl\}\}All uppercase letters: Every word separated with an underscore(\_). \tn % Row Count 6 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{TYPE CASTING}} \tn % Row 0 \SetRowColor{LightBackground} (double) 1/3 = 0.3333 & Results a double \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} int value = (int) 4.7 & Narrowing Cast \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} (int) 3.86 = 3 & Truncated \tn % Row Count 5 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{WIDENING \& NARROWING CASTING}}} \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}Does not round: Truncates!} \tn % Row Count 7 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{{\emph{ {\bf{\{\{ac\}\}byte→short→char→int→long→float→double}} }}} \tn % Row Count 9 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Narrowing Casting ( manually )} \tn % Row Count 10 (+ 1) % Row 7 \SetRowColor{white} & larger \{\{fa-arrow-right\}\} smaller \tn % Row Count 12 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{Widening Casting ({\emph{ {\bf{automatic}} }})} \tn % Row Count 13 (+ 1) % Row 9 \SetRowColor{white} & smaller \{\{fa-arrow-right\}\} larger \tn % Row Count 15 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{\{\{ac\}\}{\bf{ROUNDING}}\{\{bt\}\}} \tn % Row Count 16 (+ 1) % Row 11 \SetRowColor{white} \mymulticolumn{2}{x{5.377cm}}{int nearestInt = (int) (number + 0.5)} \tn % Row Count 17 (+ 1) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{2}{x{5.377cm}}{int nearestNegInt = (int) (negNumber – 0.5)} \tn % Row Count 18 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}