EvoNext
LESSON 15: πFile Class in javaπ πThe File class is an abstract representation of file and directory pathname. A pathname can be either absolute or relative. πOnce you have File object in hand, then there is a list of helper methodsβ¦
LESSON 16: Java Operator Precedence
> Operator precedence determines the order in which the operators in an expression are evaluated.
> the operator with the highest precedence is operated first.
> the multiplication is performed before subtraction
> Example: Operator precedence
For any suggestion : use our bot_ Learn+To+Code_bot
> Operator precedence determines the order in which the operators in an expression are evaluated.
> the operator with the highest precedence is operated first.
> the multiplication is performed before subtraction
> Example: Operator precedence
class Precedence {
public static void main(String[] args) {
int a = 10, b = 5, c = 1, result;
result = a-++c-++b;
System.out.println(result);
}
}
βΌοΈWhat will be the output of the above exampleβFor any suggestion : use our bot_ Learn+To+Code_bot
π2π₯°2π₯1
public class OperatorPrecedence {
public static void main(String[] args) {
int a = 7 * 3 + 24 / 3 - 5; int b = (7 * 3) + (24 / 3) - 5; System.out.print(a + ", " + b); } }
public static void main(String[] args) {
int a = 7 * 3 + 24 / 3 - 5; int b = (7 * 3) + (24 / 3) - 5; System.out.print(a + ", " + b); } }
Anonymous Quiz
6%
33,33
14%
33,24
56%
24,24
17%
compiler error
7%
Runtime error
π5π1π₯°1
βοΈπ Eid Mubarak βοΈπ
----------------------
To All Muslim Members of our Family, LEARN TO CODE wishes you a Happy Eid Al-Adha (Arefa)β¦!!
ααα«α α¨α’α΅ α α α α΅α α α α...!!
AYYAANA GAARII..!!
----------------------
To All Muslim Members of our Family, LEARN TO CODE wishes you a Happy Eid Al-Adha (Arefa)β¦!!
ααα«α α¨α’α΅ α α α α΅α α α α...!!
AYYAANA GAARII..!!
π4β1π1π₯°1
EvoNext
LESSON 16: Java Operator Precedence > Operator precedence determines the order in which the operators in an expression are evaluated. > the operator with the highest precedence is operated first. > the multiplication is performed before subtraction > Example:β¦
LESSON 17: EXCEPTION HANDLING IN JAVA
π Exception handling is one of the most important feature of java programming that allows us to handle the runtime errors caused by exceptions.
βοΈAn Exception is an unwanted event that interrupts the normal flow of the program.
Java try and catch
The try statement allows you to define a block of code to be tested for errors while it is being executed.
The catch statement allows you to define a block of code to be executed, if an error occurs in the try block.
public class Main {
public static void main(String[ ] args) {
try {
int[] myNumbers = {1, 2, 3};
System.out.println(myNumbers[10]);//this num is not found in the array
} catch (Exception e) {
System.out.println("Something went wrong.");
}
}
}
THERE ARE 2 PRIMARY EXCEPTION TYPES:
1οΈβ£ Checked Exception
2οΈβ£ Unchecked Exception
Contact_bot Β» https://t.me/LearnToCode_bot
π Exception handling is one of the most important feature of java programming that allows us to handle the runtime errors caused by exceptions.
βοΈAn Exception is an unwanted event that interrupts the normal flow of the program.
Java try and catch
The try statement allows you to define a block of code to be tested for errors while it is being executed.
The catch statement allows you to define a block of code to be executed, if an error occurs in the try block.
public class Main {
public static void main(String[ ] args) {
try {
int[] myNumbers = {1, 2, 3};
System.out.println(myNumbers[10]);//this num is not found in the array
} catch (Exception e) {
System.out.println("Something went wrong.");
}
}
}
THERE ARE 2 PRIMARY EXCEPTION TYPES:
1οΈβ£ Checked Exception
2οΈβ£ Unchecked Exception
Contact_bot Β» https://t.me/LearnToCode_bot
Q1:When an improper or erroneous argument is supplied to a method, βββ exception occurs.
Anonymous Quiz
16%
ArrayIndexOutOfBoundsException
8%
NullPointerException
66%
IllegalArgumentException
10%
NumberFormatException
π1
Q2:When you try to retrieve an object using a reference variable whose current value is empty, you'll get__________ exception.
Anonymous Quiz
66%
NullPointerException
12%
ArrayIndexOutOfBoundsException
16%
IllegalArgumentException
6%
NumberFormatException
π1π€1
Introduction-to-Algorithms-Third-Edition-booksfree.org_.pdf
5.4 MB
π»Introduction to Algorithms- MIT
π1
Termination of Recursive program is achieved by :___
Anonymous Poll
36%
decreasing the parameter to base case
24%
solving smaller version of the same problem
39%
recursive case equals base case
30%
All
5%
None
π1
Forwarded from Back End Developemnt
From the languages given, which one is back-end coding language
Anonymous Quiz
38%
Javascript
8%
React
31%
SQL
10%
JQuery
13%
All
π4π1
Forwarded from Front End Development
AWT and SWING.pdf
1.4 MB
GUI short notes for Java Onlyππ»
π2
This method determines where an element will be displayed on the screen and its size
Anonymous Quiz
14%
setParameter
28%
setSize
44%
setBounds
14%
setMenu
which of the following is reqiured before adding textFields, labels , buttons or tool tips
Anonymous Quiz
13%
JButtons
60%
JFrame
6%
JTextArea
14%
JtextField
8%
None
Forwarded from Front End Development
which of the following correctly adds a listener to a button?
Anonymous Quiz
12%
button.addAction(new Action() { }
55%
button.addActionListener(new ActionListener() { }
10%
button.addAction(new Action() { }
17%
ActionListener = button.addAction(new Action() { }
4%
addActionListener(new ItemListener) {}
2%
None
Forwarded from Front End Development
Identify the unchecked Exception from the given choices
Anonymous Quiz
39%
NullPointerException
19%
SQLException
23%
InterruptException
11%
IOException
8%
None
Forwarded from Front End Development
identify the checked Exception
Anonymous Quiz
32%
ArithmeticException
35%
FileNotFoundException
17%
ClassCastException
10%
ArrayStoreException
6%
none