exception tag

51 questions


1 answers
77 views
0
Unboxing of 'characteristics.get(CameraCharacteristics.LENS_FACING) 'may produce' java.lang.NullPointerException'

https://github.com/yabushi/TimeStampCameraThe part I wrote myself ↓ https://github.com/yabushi/TimeStampCamera/blob/4b4c441675a6a5e7d6b2cf1f0448e19b1a115fd7/app/src/main/java/com/example/shigeki/times...


1 answers
101 views
0
To determine if a variable exists?

What should I do if I want to know what variables exist or not?Is there any other way than to write an exception like my code?try: myVarexcept NameError: # # Do something.

2 years ago

1 answers
120 views
0
Can you handle multiple exceptions in the same catch statement when handling exceptions?

When we make an exception in Java.try { ... } } catch (IllegalArgumentException e) { someCode();} } catch (SecurityException e) { someCode();} } catch (IllegalAccessException e) { someCode();} } catc...

2 years ago

1 answers
150 views
0
Why is it possible to do throw null; when handling exceptions" in Java?

public class WhatTheShoot { public static void main(String args[]){ try { throw null; } } catch (Exception e){ System.out.println(e instanceof NullPointerException); System.out.println(e instance...


2 answers
116 views
0
C# Exception VS Return Code

Question 1 public class foo { } public foo SomeFooNULL() { var newFoo = new foo(); if(null == newFoo) { return null; } return newFoo; } public foo SomeFooException() { var newFoo = new foo(); ...


1 answers
103 views
0
Null pointer exception occurs when you call findViewById() on Android.

Could you tell me what the problem is in the program below? In the onCreate() method, findViewById() is called, and the return value is null even if you try all the id.I don't know why, but does anyon...


1 answers
133 views
0
What exception is java.lang.ArrayIndexOutOfBoundsException, and how do I prevent that exception from occurring?

What is the meaning of ArrayIndexOutOfBoundsException? How can I handle this exception?The following source code is an example of where this exception occurs.String[] name = {tom, dick, harry};for(int...


1 answers
120 views
0
Can I use exception functionally? Should I avoid it?

The class itself that you want to use has already thrown an exception to an invalid input value.While trying to create a method and conditional statement that checks with isblabla~() in advance, I tho...

2 years ago

1 answers
138 views
0
Exception handling question when asynctask communicates with the server.

The server has been parsing in JSON format through async asynchronous communication. However, sometimes if the server is being checked or there is a problem with the server, an error appears immediate...


2 answers
106 views
0
I made a baseball game, but I can't find the error.

I made it like below, and it works well to the first function that prevents duplicate numbers.For example, if you enter 123 and you have at least one strike,If you repeatedly enter 123 several times, ...

« - 2 - »

© 2024 OneMinuteCode. All rights reserved.