V
V
Vlad_Radigin2018-06-02 10:33:42
Java
Vlad_Radigin, 2018-06-02 10:33:42

How to solve a problem in java?

The task itself -> Implement a method that returns the letter in the UNICODE table after the "\" character (backslash) at distance a. <-
I can not understand how to solve it?
What do we have to do?
Help!
A small example, or template, or whatever you want to call it -> return (int) '\\' + (char) 1021;
But I do not understand how it works, and why if you use it, an error occurs!
Tell me why if you use it, you always get an error? is it because of the plus sign?
And at least chu-slightly tell how this works, please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Kopendakov, 2018-06-02
@alex_kag

char simbolA = 'A';
char simbolB = (char)((int)simbolA+1);

Do you think the meaning is clear?

1
108omg, 2020-07-22
@108omg

return (char) ('\\' + a);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question