The literal XXXXXXXXXX of type int is out of range 处理办法
来源:互联网 发布:2017淘宝上传宝贝视频 编辑:程序博客网 时间:2024/05/30 02:23
最近在学习OAuth2.0认证以及使用新浪微博的API
在填写自己申请的APP_KEY的时候这个值是10位的,填上后就报错了"The literal XXXXXXXXXX of type int is out of range"
WeiboParameters parameters = new WeiboParameters();parameters.add("client_id", XXXXXXXXXX));// 申请的APP_KEY
可以看出,在Java代码中直接书写的数字是int类型的,数字的范围在 -2^31 到 2^31 - 1 这个范围之中,超出报错
那么我们只要这样写就可以了
parameters.add("client_id", Long.parseLong("XXXXXXXXXX"));
Long.ParseLong(String)方法,将 string 参数解析为有符号十进制
long型,字符串中的字符必须都是十进制数字
。- The literal XXXXXXXXXX of type int is out of range 处理办法
- Java中long类型直接赋值出现The literal xxxxxxxxxx of type int is out of range 问题的原因和解决方法
- The literal 9999999999 of type int is out of range 或 400(rad request)
- Java 中The literal 078 of type int is out of range问题
- The literal of int xxxxx is out of range
- The literal of int xxxxx is out of range
- integer operation result is out of range
- IOException: Packet len5601403 is out of range!
- 错误处理:The hierarchy of the type MyMethodBeforeAdvice is inconsistent
- 遭遇 'Value of field 'A1' is out of range ...
- return type of 'main' is not `int'
- SQLSTATE[22003]: Numeric value out of range: 1690 BIGINT UNSIGNED value is out of range解决方法
- Dynamics CRM2016 The value of field on record of type entity is outside the valid range问题的解决方法
- Access out of range
- pointerIndex out of range
- one of arguments' values is out of range (index is out of range) in function cvPtr2D,c:\\
- range of type
- The hierarchy of the type is inconsistent
- 为什么需要Page Object?
- 浅谈求素数的方法
- jquery页签效果
- testestestestestesteste
- 构建高性能web专题
- The literal XXXXXXXXXX of type int is out of range 处理办法
- cookie与session区别
- uva 301 Transportation 铁路公司的阳谋 纯dfs暴力
- 安装apk
- 讲义:第五项修炼(学习型组织的艺术与实践)
- 条款1:尽量用const和inline 而不用#define (第一章 从C转向C++)
- servlet/filter/listener/interceptor区别与联系
- 条款2:尽量用<iostream>而不用<stdio.h>
- DragonBones快速入门指南1