---
# System prepended metadata

title: Answer Question for Basic Programming and Flaky Test

---

Answer Question for Basic Programming and Flaky Test
=====================================================

# **Basic Programming**

### 1. What is the data-type usually used in arithmetic operation?

```
Integer
```

### 2. What is the data-type usually used in word and character?

```
String
```

### 3.What is the output of code below

```
public class area{

     public static void main(String []args){
       int a = 100 + 3 * 5 - 10 / 5;
       System.out.println(a);
     }
}
```
**Output**
```
113
```
### 4.What is the output of code below

```
public class average{

     public static void main(String []args){
       int a = 0;
       for (int i = 0; i<6; ++i){
           a= a + 2;
       }
       System.out.println(a/6);
     }
}
```
**Output**
```
2
```
### 5.What is the output of code below

```
public class Question3{

     public static void main(String []args){
       String name, address;
       
       name = "Jack Donovan";
       address = "3566 Golden Street Miami";
       System.out.println(address.replace(" ", ""));
     }
}
```
**Output**
```
3566GoldenStreetMiami
```

# **Flaky Test**

### 1. What is a flaky test?

```
flaky test is test with result as a test that exhibits both
a passing and a failing result with the same code.
```
### 2. An element in a website is using ajax/javascript to show the data (processed as asynchronous). What do you do to test that element?

```
I will use wait methods: 
1. Explicit Waits
2. Implicit Waits
3. Fluent Waits
4. WebDriverWait
5. Thread.sleep
```

### 3. A website page can only be accessed with CAPTCHA. How do you test that page?

```
Make the captcha static
```

<!-- Other important details discussed during the meeting can be entered here. -->
