【问题标题】:How to resolve the null pointer exception error in my java program?如何解决我的java程序中的空指针异常错误?
【发布时间】:2022-12-05 17:02:58
【问题描述】:

'我试图通过连接数据库创建一个用户表来输入用户数据,即使用 try 和 catch 块的 MySQL,但它显示 java.lang.nullpointerexception'

(https://i.stack.imgur.com/yMCAt.png)

More images for reference

More images for reference

More images for reference


I tried to create a user Table in MySQL for entering the data of the user but instead of showing the message "User Table created successfully it is showing the "java.lang.null pointer exception" error.
Can anyone please help me to solve the error? 

【问题讨论】:

标签: java datatable nullpointerexception


【解决方案1】:

如果你在你的陈述中改变这些词的顺序,试试看它是否有效,就像这样: ID INT 主键 AUTO_INCREMENT

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多