Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在创建一个 J2ME 应用程序。我在其中创建了一条记录,每次更新它的值时都必须经常访问它。但是每次我运行我的应用程序时,它都会再次创建记录,因为我已经在其中编写了记录的创建代码startApp()。我无法在哪里定义创建代码,所以下次访问记录时我应该获得更新的值吗?更新的东西在Commandlistener.
Commandlistener
编写一个创建记录的方法和另一个从记录存储读取的方法。仅当不存在记录时才调用创建记录的方法。