Computer Science, asked by Anonymous, 1 year ago

how to handle java programs?? pls someone give advice
and tips also
its really hard for me

Answers

Answered by TR0YE
3
⛦Hᴇʀᴇ Is Yoᴜʀ Aɴsᴡᴇʀ⚑
▬▬▬▬▬▬▬▬▬▬▬▬☟

▶Java programs handles by Five keywords:-

[1] Try
[2] Catch
[3] Throw
[4] Throws
[5] Finally

♦ Java provides a powerful way to handle such exceptions which is known as exception handling.

♦ In it we write vulnerable code that is, code which can throw exception in a separate block called as try block and exception handling code in another block called catch block.

_________
Thanks...✊

Anonymous: java is very easy . u need to understand the code and know each and every concept of a program. ur basics shud be strong . then only u will be the best coder ^_^
Answered by Anonymous
1

I guess you are talking about how to handle JAVA programs by writing perfect codes .

If you wanted the keywords of error handling then your question should have been : " How to handle Java exceptions " ? (Correct me if I am wrong)

Exceptions are nothing but errors in the program.

We need to remove errors in order to make us an efficient programmer.

_____________________________________________________

                                     Advice and tips

→ The best way to reduce the errors is to practice and practice . Yes practicing how to code will significantly reduce your errors .

→ Download Blue J from google ( in a computer ). Then you can code and see in your code the mistakes you commit

→ If there's any problem comment and ask.

→ JAVA has an easy pattern its programming.Programs are easy but theory is a bit difficult at first :(

  • Actually our education system is the culprit !
  • First we should have been taught programs then theory isnt'it?
  • The theory part should be understood by asking the teachers.
  • If you still can't understand then I would recommend this app/site : sololearn

By the way you can also create another account in : quora

There are certain keywords which should be used in a program to remove exceptions :

  1. Throws
  2. Try
  3. Catch

I have studied only these 3 . More you can get from the other answer .

These keywords remove exceptions or errors from your program

Codes

The class always has a name . It may or may not have main() function. It should always end with } and start with {

Here is a sample class for ya !

class Sample

{

public void main()

{

System.out.println("I am learning JAVA");

}

}

The syntax is:

class

{

.....................( may include methods , inputs ,variables and outputs)

}

Hope it helps you ^_^ #Have fun in coding#

_____________________________________________________________________


Similar questions