1 777
订阅者
-224 小时
-147 天
-3630 天
帖子存档
1 777
Repost from Front End Development
which of the following correctly adds a listener to a button?
1 777
which of the following is reqiured before adding textFields, labels , buttons or tool tips
1 777
This method determines where an element will be displayed on the screen and its size
1 777
Repost from N/a
From the languages given, which one is back-end coding language
1 777
Q2:When you try to retrieve an object using a reference variable whose current value is empty, you'll get__________ exception.
1 777
Q1:When an improper or erroneous argument is supplied to a method, ——— exception occurs.
1 777
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
1 777
⭐️🌙 Eid Mubarak ⭐️🌙
----------------------
To All Muslim Members of our Family, LEARN TO CODE wishes you a Happy Eid Al-Adha (Arefa)…!!
መልካም የኢድ አል አድሀ በአል...!!
AYYAANA GAARII..!!
1 777
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); } }
1 777
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); } }
1 777
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
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❓
现已上线!2025 年 Telegram 研究 — 年度关键洞察 
