INHOUDSOPGAWE:

Wat is die verskillende tipes uitsonderings in JDBC?
Wat is die verskillende tipes uitsonderings in JDBC?

Video: Wat is die verskillende tipes uitsonderings in JDBC?

Video: Wat is die verskillende tipes uitsonderings in JDBC?
Video: Reisverzekering: alles over de dekking! 2024, Mei
Anonim

JDBC-uitsondering

  • Verstaan met voorbeeld.
  • Bestuurder. getConnection (): Dit word gebruik om verbinding tussen url en databasis te bou.
  • con. create Statement (): Dit word gebruik om 'n SQL-objek te skep.
  • executeQuery (): Dit word gebruik om die resultaatstel wat uit die rekordstel van die databasis verkry is, terug te gee.
  • rs.
  • Uitset.

Wat dit betref, wat is die verskillende tipes uitsonderings in Java?

Tipes uitsonderings in Java met voorbeelde

  • Rekenkundige Uitsondering. Dit word gegooi wanneer 'n uitsonderlike toestand in 'n rekenkundige bewerking voorgekom het.
  • ArrayIndexOutOfBoundsException.
  • ClassNotFoundException.
  • FileNotFoundException.
  • IO Uitsondering.
  • Onderbreek Uitsondering.
  • NoSuchFieldException.
  • NoSuchMethodException.

Net so, wat is die algemene JDBC-uitsonderings?

  • Java.sql. BatchUpdateException.
  • java.sql. SQLEuitsondering.
  • java.sql. DataTruncation.
  • java.sql. SQLWaarskuwing.

Om ook te weet, wat is verskillende tipes uitsonderings?

Daar is hoofsaaklik twee tipes uitsonderings : gemerk en ongemerk waar fout as ongemerk beskou word uitsondering . Die sonmikrosisteem sê daar is drie tipes uitsonderings : Gekontroleer Uitsondering . Ongemerk Uitsondering.

Tipes uitsonderingshantering:

  • Klas nie gevind uitsondering nie.
  • IOException.
  • Looptyd-uitsondering.

Wat is uitsondering en verskillende tipes uitsondering?

Jy sal ook leer oor verskillende tipes uitsonderings in Java . Uitsonderings is die ongewenste foute of foute of gebeurtenisse wat die normale uitvoering van 'n program beperk. Elke keer as 'n uitsondering voorkom, word programuitvoering ontwrig. 'n Foutboodskap word op die skerm vertoon.

Aanbeveel: