KwickAcademy Java · 7 min · free
ISC Class XI Java Revision in One Go
A full Class XI Java revision: data types, operators, control flow, classes, arrays and strings, plus the ideas Class XII papers reuse.
Follows the syllabus of: ISC Class 12 Computer Science (868)
On screen in this lesson
Data types at a glance
| Type | Size | Example |
|---|---|---|
| byte / short | 1 / 2 bytes | byte b = 10; |
| int / long | 4 / 8 bytes | long p = 90L; |
| float / double | 4 / 8 bytes | double d = 2.5; |
| char | 2 bytes | char g = 'A'; |
| boolean | true or false | boolean ok; |
| String | reference | String s = "Hi"; |
Operators at a glance
| Group | Operators | Result |
|---|---|---|
| Arithmetic | + - * / % | number |
| Relational | == != < > <= >= | boolean |
| Logical | AND, OR, NOT | boolean |
| Assignment | = += -= *= | stores value |
| Unary | ++ -- | adds or takes 1 |
| Ternary | c ? x : y | picks one |
Control flow at a glance
| Statement | Use it when | Runs body |
|---|---|---|
| if-else | two paths | once or not |
| switch | one of many values | matching case |
| for | count is known | 0 or more |
| while | stop on a condition | 0 or more |
| do-while | run at least once | 1 or more |
Constructor or method?
| Point | Constructor | Method |
|---|---|---|
| Name | same as class | any name |
| Return type | none, not void | needed, or void |
| Called | by new, once | any time |
| Default given | yes, if none | no |
String traps
| length() for a String, length for an array |
| Compare Strings with equals(), not == |
| Strings are immutable: methods return a new String |
| charAt past the end gives an exception at run time |
Class XI ideas tested in XII
| Idea | Asked as | Revise |
|---|---|---|
| ++ and -- | output tracing | prefix vs postfix |
| Loops | dry run, count | digits, series |
| Strings | output, program | charAt, substring |
| Arrays | search, sort | linear, bubble |
| Classes | write a class | constructor, this |
| Casting | output tracing | int division |
Quick answers
What does int y = x++ + ++x give when x is 5?
y is 12 and x becomes 7, because postfix uses the old value and prefix changes it first.
Why compare Strings with equals()?
Because == only checks whether both names point to the same object.
KwickClips from this lesson
Short clips, one idea each. Good for revision the night before.
Why does 7 / 2 print 3?43 sec
Is a constructor a method?41 sec
Which one needs brackets?40 sec
Which Class 11 topics return in Class 12?45 secThe full lesson, in text
Hello students, welcome to Kwickprep. Class twelve Java is built directly on top of Class eleven Java. Can you revise all of it in one sitting? Yes. Today we recap data types, operators, control flow, classes, arrays and strings. Then we look at the Class eleven ideas that come back most often in Class twelve papers.
Start with the data types, the kind of value a variable holds. Byte and short store small whole numbers in one and two bytes. Int and long store bigger whole numbers, and a long value ends with capital L. Float and double store decimals, and double is the default for decimal values. Char stores one Unicode character in two bytes. Boolean stores only true or false. String is not primitive, it is a reference type, a class.
Next, the operators. Arithmetic operators give a number, and percent gives the remainder. Relational operators compare two values and give true or false. Logical AND, OR and NOT join conditions, and they are typed as two ampersands, two bars and an exclamation mark. One equals stores a value, while plus equals adds and stores. Plus plus and minus minus change a variable by one. The ternary operator picks one of two values using a condition.
Here is the most asked output question. The variable x starts at five. In x plus plus, the old value five is used first, then x becomes six. In plus plus x, x becomes seven first, then seven is used. So y is five plus seven, which is twelve, and x is seven. It prints seven, space, twelve.
Control flow decides which lines run and how often. If else chooses between two paths. Switch picks the case that matches one value, and break stops it falling into the next case. A for loop suits a known count. A while loop checks the condition first, so it may run zero times. A do while loop checks at the end, so it always runs at least once.
Papers love digit programs, so revise this pattern. The number n is four seven two. This for loop has no start part, and it runs while n is more than zero. Percent ten gives the last digit, and divide by ten removes it, because int division drops the decimal. The variable s keeps the sum. The loop adds two, then seven, then four, so s is thirteen.
Now classes on one screen. A class is a blueprint, and Box has one instance variable called side. The constructor has the same name as the class and no return type. It runs when main writes new Box of four, and stores four in side. Area is a method that returns side times side. We call it on the new object, so the program prints sixteen.
Examiners often ask for differences, so learn this table. A constructor has the same name as the class, a method can have any name. A constructor has no return type, not even void, but a method must have one. A constructor runs once, when new creates the object, but a method can be called any time. If you write no constructor, Java gives a default one, but never a default method.
An array stores many values of one type under one name. Here the array m holds three marks. The first index is zero, so m of zero is forty five, and m dot length is three, with no brackets. The for each loop takes each mark in turn as v, and keeps the larger one in hi, short for highest. It prints seventy two.
A String is an object, so its tools are methods with brackets. The String s holds Kwickprep, and its length method gives nine. Char at five gives p, because counting starts at zero. Substring of one comma five gives characters from index one up to four, and t becomes wick. The end index is never included.
Four string traps lose marks every year. A String uses length with brackets, and an array uses length without brackets. Compare two Strings with the equals method, because double equals only checks whether they are the same object. Strings are immutable, which means they never change, so to upper case gives back a new String. Char at with a bad index compiles, but crashes with StringIndexOutOfBoundsException when it runs.
Which Class eleven ideas come back in Class twelve? These six are used again and again in Class twelve questions and practicals. Prefix and postfix appear in output tracing questions. Loops appear as dry runs, digit programs and series. String methods appear both in outputs and in full programs. Arrays come back as linear search, binary search, bubble sort and selection sort. Class twelve programs are written as classes with constructors, and casting traps appear in outputs.
Pause the video and predict all three lines. Seven divided by two is three, because both are int and the decimal is dropped. Char A plus one is sixty six, because a char used in arithmetic becomes its Unicode number. In the last line, the empty String comes first. So A and one are joined as text, and it prints A one.
Let us revise in five lines. Java has eight primitive types, and String is a reference type. Prefix changes the value first, and postfix uses the old value first. A constructor has the class name, no return type, and runs with new. Indexes start at zero, and the end index of substring is not included. Compare Strings with equals. Now try each program with new numbers before you check the answer.
Courses that teach this
| Course | Unit |
|---|---|
| ISC Class 12 Computer Science (868) | Implementation (Algorithms to Programs) |
Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.
Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.

