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 14:25 Go to next message
Joakim Reigstad is currently offline Joakim Reigstad
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 09:47 Go to previous message
Ivan Galicia is currently offline Ivan Galicia
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: Thu Jul 31 19:57:47 EDT 2014

Powered by FUDForum. Page generated in 0.01455 seconds