deng_cen 19 Newbie Poster

hi:
you can see my code whether help you
package com.structure;
import java.util.ArrayList;
import java.util.List;
public class Text {
String statement;
List<Character> listchar = new ArrayList<Character>();
public Text(String statement) {
super();
this.statement = statement;
exchangeList();
}
private void exchangeList() {
for (int i = 0; i < statement.length(); i++) {
listchar.add(statement.charAt(i));
}
}
public String deleteIndex(int index) {
String temporary="";
listchar.remove(index);
for (Character c : listchar) {
temporary += c;
}
return statement = temporary;
}
public String getStatement() {
return statement;
}
public void setStatement(String statement) {
this.statement = statement;
}
public static void main(String args[]) {
Text text = new Text("this is deng statement");
System.out.println(text.getStatement());
text.deleteIndex(4);
System.out.println(text.getStatement());
}
}

Ezzaral commented: No code tags. Example does little to demonstrate the question. +0
iamthwee commented: Get a life, do your own homework! -2
~s.o.s~ commented: Please be more descriptive and post code using code tags. +24
deng_cen 19 Newbie Poster

hi:
you can analyse this coding program
package com.applet;
public class Triangle {
/**
* @param a
* the length of a for the triangle
* @param b
* the length of b for the triangle
* @param c
* the length of c for the triangle
*/
private double a, b, c;
private double angleA, angleB, angleC, area, perimeter;
public Triangle(double a, double b, double c) {
this.a = a;
this.b = b;
this.c = c;
angleA = 0;
angleB = 0;
angleC = 0;
area = 0;
perimeter = 0;
}
public void calculateAngles() {
final double RADIANS_TO_DEGREES = 180 / Math.PI;
angleC = Math.acos((2 * c - 2 * b - 2 * a) / (-2 * a * b))
* RADIANS_TO_DEGREES;
angleB = Math.acos((2 * b - 2 * a - 2 * c) / (-2 * a * b))
* RADIANS_TO_DEGREES;
angleA = Math.acos((2 * a - 2 * c - 2 * b) / (-2 * a * b))
* RADIANS_TO_DEGREES;
}
public double calculateArea() {
double halfperimeter = calculatePerimeter() / 2;
return area = Math.sqrt(halfperimeter * (halfperimeter - a)
* (halfperimeter - b) * (halfperimeter - c));
}
public double calculatePerimeter() {
return perimeter = (a + b + c);
}
public …

iamthwee commented: ur fucking retarded -2
deng_cen 19 Newbie Poster

yes ,if infinite loop ,that code
while(true){
}

peter_budo commented: Pointles on comenting somebody else corect solution. Please use full sentences next time. -1