java - What's causing '<identifier> expected' errors? -


i'm sure has got simple fix can't see i've done wrong. know traditionally error means has written code outside method haven't.

keep in mind, class , frame classes i've made , work fine (i know it's bad call class "class", writing code creates uml class diagram.

import java.util.scanner; import javax.swing.*;  public class filescanner {      public static void main(string[] args) {         int column = 1;          scanner scanner = new(system.in);          class object = new("object", null);          jframe f = new jframe("uml class diagram");         f.setsize(600, 600);         f.setdefaultcloseoperation(jframe.exit_on_close);         f.add(new frame());         f.setvisible(true);     } } 

error occurs on scanner object instantiation , class object instantiation lines.

scanner scanner = new(system.in);      class object = new("object", null); 

you have 'new', must specify type:

scanner scanner = new scanner(system.in); class object = new class("object", null); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -