java - 意外的返回值,找不到符号,不兼容的类型
问题描述
我弹出三个错误我正在尝试找出解决方法
- 第一个无效的方法声明;需要返回类型
- 第二个找不到符号——符号:变量a
- 第三种不兼容类型:意外的返回值
public class Telephone
{
String number;
static int quantity;
static double total;
private static makeFullNumber(String telephoneNumber, int areaCode)
{
a = areaCode + "-" + telephoneNumber;
return a;
}
}
解决方案
推荐阅读
- django-rest-framework - 序列化程序 `validate()` 没有在 POST 上的 `is_valid()` 上被调用
- git - Git合并到适当的子目录
- mysql - Cakephp 3 - 克罗地亚语数据排序
- python - 用 Python 和 Pandas 处理矩阵
- javascript - 这个函数在做什么?我对读写部分最困惑
- c# - 在 WebJob 中使用 WinSCP 移动文件时出现问题
- c++ - 增量时间无法与 GLFW 正常工作
- javascript - 在 .push() 方法 (JS/vue.js) 之后,一个数组仍然引用第二个数组
- javascript - 如何在 Webpack 4 项目中导入自定义 UMD 模块
- android - 如何加载更多消息并仍然让侦听器监听新消息事件?