Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Syntax error(Syntax error insert ";" to complete statement)
Syntax error [message #1076112] Tue, 30 July 2013 18:25 Go to next message
Joakim Reigstad is currently offline Joakim ReigstadFriend
Messages: 1
Registered: July 2013
Junior Member
Hello, im very new to this. and wondered if someone could help me get my error.
please help! Smile
i've just started to learn the program.


package com.example.buttontryout;

import android.os.Bundle;
import android.app.Activity;
import android.app.AlertDialog;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity implements View.OnClickListener{

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

}


public void onClick(View v){}

public <just> void buttonBtn (View v){

Toast.makeText(this, "You just pressed a button.I bet you feel like a genius", Toast.LENGTH_LONG).show();
}

public void onClick1(View v){}

public void Alertbtn (View v){

new AlertDialog.Builder(this)
.setTitle("DANGER!")
.setMessage("DANGER Rebecca Fjeldberg, DANGER!")
.setNeutralButton("OK", null)
.show();

protected void onCreate1(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


final EditText editCentimeters = (EditText) findViewById(R.id.editTextCentimeters);
final EditText editInches = (EditText) findViewById(R.id.editTextInches);

Button buttonConvert = (Button) findViewById(R.id.buttonConvert);

buttonConvert.setOnClickListener(new OnClickListener(){

public void onClick(View arg0){

double centimeters = Double.valueOf(editCentimeters.getText().toString());

double inches = centimeters * 0.393701 ;

editInches.setText(String.valueOf(inches));
Re: Syntax error [message #1078067 is a reply to message #1076112] Fri, 02 August 2013 13:47 Go to previous message
Ivan Galicia is currently offline Ivan GaliciaFriend
Messages: 17
Registered: September 2012
Junior Member
Hi joakim,

the piece of code are complete, I can find where you close few brackets.

Regards
Previous Topic:Missing MinGW toolchain in Kepler
Next Topic:Debug Config, not showing 'new' connections
Goto Forum:
  


Current Time: Fri Dec 19 18:13:15 GMT 2014

Powered by FUDForum. Page generated in 0.01788 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software