Still not at all good, I am afraid.
If you write
"room".equals(n), there is no need for the
null test. That code can be relied upon never to throw a null pointer exception. It is also not possible for the Scanner#nextLine() method to return
null.
Names like
java_lesson2,
n, and
p are not at all good, because nobody can tell what they mean by looking at them. Only use
_s in names of constants. Write something like
InputDemo, and start class names with
Capital
Letters please.
Make all the fields
private and initialise them
via a constructor. Always write a constructor because otherwise the compiler will add a default constructor, which might not do what you want.
Please indent your code consistently; lines 15‑39 are too far to the left and lines 42‑55 are too far to the right. Please divide those
long lines (47, 50, and 53) into several shorter lines; they are very difficult to read.