How to avoid 'the local variable may not have been initialized'?

后端 未结 8 1163
半阙折子戏
半阙折子戏 2020-11-27 23:00
/*This is a program that calculates Internet advertising rates based on what features/options you choose.
 * 
 *  
 */

import java.util.Scanner;

public class Inter         


        
8条回答
  •  北荒
    北荒 (楼主)
    2020-11-27 23:26

    the error message tells you, that those variables aren't always initialized. This is, because your initialization happens only under certain conditions (they are located in if-statements). Hope this helps..

提交回复
热议问题